Actualizar Método de Pago

Actualiza un método de pago existente.

Argumentos

TipoDescripción
idstringId del método de pago.
namestringNombre del tarjeta habiente.
exp_monthstringMes de expiración de la tarjeta.
exp_yearstringAño de expiración de la tarjeta.
addresshashDirección del tarjethabiente.
customer = Conekta::Customer.find("cus_zzmjKsnM9oacyCwV3")
customer.payment_sources.first.update(exp_month: 11)
curl -H "Accept: application/vnd.conekta-v2.0.0+json" \
     -H "Content-type: application/json" \
     -u key_eYvWV7gSDkNYXsmr: \
     -X PUT -d '{
       "exp_month": 11
     }' https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/payment_sources/src_2fw8YeLSqoaGEYTn3
$customer = \Conekta\Customer::find("cus_zzmjKsnM9oacyCwV3");
$customer->payment_sources[0]->update([
  'exp_month' => 11
]);
conekta.Customer.find("cus_zzmjKsnM9oacyCwV3", function(err, customer) {
  customer.payment_sources.get(0).update({ exp_month: 11 },
  function(err, paymentSource) {
    console.log(paymentSource);
  });
});
customer = conekta.Customer.find("cus_zzmjKsnM9oacyCwV3")
customer.payment_sources[0].update({"exp_month": 11})
Customer customer = Customer.find("cus_zzmjKsnM9oacyCwV3");
JSONObject paymentSourceUpdateJSON = new JSONObject("{'exp_month': '11'}");
PaymentSource paymentSourceUpdated = (PaymentSource) customer.payment_sources.get(0);

paymentSourceUpdated.update(paymentSourceUpdateJSON);
Customer customer = new conekta.Customer().find("cus_zzmjKsnM9oacyCwV3");
PaymentSource payment_source = (PaymentSource)customer.payment_sources[0];

payment_source.update(@"{
  ""exp_year"": ""17""
}");
import  (
    conekta "github.com/conekta/conekta-go"
    "github.com/conekta/conekta-go/charge"
)

chargeParams := &conekta.ChargeParams{
    PaymentMethod: &conekta.PaymentMethodParams{
        Type:    "card",
        TokenID: "tok_test_visa_4242",
    }, 
}

charge.Create("ord_2nBZ4a8tNqxo2uQk6", chargeParams)