[英]Updating Stripe customer address and NOT card info
Is it possible to just update a customer's stored address on Stripe and not the card as well? 是否可以只更新客户在Stripe上存储的地址而不是卡? Reason I am asking is the way I have it now, the customer can update their info, but it requires their card to be entered as well even if it is just a city change. 我问的原因是我现在的方式,客户可以更新他们的信息,但它也需要输入他们的卡,即使它只是一个城市变化。
I'm using the following to create a token and update the customer's info 我正在使用以下内容创建令牌并更新客户的信息
$("#payment-form").submit(function(event) {
// disable the submit button to prevent repeated clicks
$('#stripe-submit').attr("disabled", "disabled");
// combine first & last name
var fullname = $('[name="first-name"]').val() + " " + $('[name="last-name"]').val();
// send the card details to Stripe
Stripe.createToken({
number: $('.card-number').val(),
cvc: $('.card-cvc').val(),
exp_month: $('.card-month').val(),
exp_year: $('.card-year').val(),
name: fullname,
address_line1: $('[name="address"]').val(),
address_city: $('[name="city"]').val(),
address_state: $('[name="state"]').val(),
address_zip: $('[name="zip"]').val(),
address_country: $('[name="country"]').val()
}, stripeResponseHandler);
// prevent the form from submitting with the default action
return false;
});
Is there something like an updateToken I could use? 有没有像我可以使用的updateToken? So I could change only certain values. 所以我只能改变某些值。
At the moment, no. 目前,没有。 To update any property of the card you'll need to re-collect the full card details from the customer. 要更新卡的任何属性,您需要重新收集客户的完整卡详细信息。
Looks like this has been available for a while now: 看起来这已经有一段时间了:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.