140: invalid card owner, Market paid, Associate card to

0

This is my code

public function create_card($id, $token)
    {
        $request = array(
                            "uri" => "/v1/customers/{$id}/cards",
                            "data" => array(
                                  "token"=>$token
                                            ),
                            "params" => array(
                                "access_token" => $this->get_access_token())

                        );

        $customer = MPRestClient::post($request);
        return $customer;
    }

but in the end when I try to associate the card I get this error: 140: invalid card owner,

Of course I already capture the card token and already create the customer, what I need is to simply associate the card with the customer

    
asked by Eder Daniel Valcarcel Vanegas 01.09.2018 в 21:38
source

1 answer

0

the answer was very simple, in my case the application was made in laravel ... therefore the access codes were in the .env file the token, client_id and client_secret. But I was doing tests with another account too. the point is that I was recording the customers and cards_token with another account and of course when the vat to associate told me that I was not the owner of the card ... so guys check that your client_id, client_secret, public_key and paid market token_accesss are the ones correct at the time of performing these actions in the api de mercadopago

    
answered by 06.09.2018 в 17:42