Skip to content

Como hacer un pago(cargo) a customer con tarjeta guardada? #345

Answered by gdeandradero
ErickZH asked this question in Q&A
Discussion options

You must be logged in to vote

Hola @ErickZH como estás?

si, es posible, de la siguiente manera:

MercadoPago\SDK::setAccessToken("ENV_ACCESS_TOKEN");

$payment = new MercadoPago\Payment();

$payment->transaction_amount = 100;
$payment->token = "ff8080814c11e237014c1ff593b57b4d";
$payment->installments = 1;
$payment->payer = array(
      "type" => "customer",
      "id" => "123456789-jxOV430go9fx2e"
  );

$payment->save();

más detalles: https://www.mercadopago.com.mx/developers/es/docs/checkout-api/advanced-integration/remember-customers-and-cards

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@gdeandradero
Comment options

@ErickZH
Comment options

@gdeandradero
Comment options

@ErickZH
Comment options

@gdeandradero
Comment options

Answer selected by gdeandradero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants