admin管理员组文章数量:1356924
Is it possible to just update a customer's stored address on Stripe and not the card as well? 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");
// bine 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? So I could change only certain values.
Is it possible to just update a customer's stored address on Stripe and not the card as well? 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");
// bine 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? So I could change only certain values.
Share Improve this question edited Apr 30, 2013 at 13:26 Kdeveloper 13.8k11 gold badges44 silver badges50 bronze badges asked Apr 26, 2013 at 5:53 souporserioussouporserious 2,1572 gold badges27 silver badges49 bronze badges2 Answers
Reset to default 6At 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:
- Announcement https://stripe./blog/multiple-cards
- Api docs: https://stripe./docs/api#update_card
本文标签: javascriptUpdating Stripe customer address and NOT card infoStack Overflow
版权声明:本文标题:javascript - Updating Stripe customer address and NOT card info - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744004897a2574520.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论