有没有一种方法可以使用stripe.net为一个客户添加多张卡,我知道我们需要检索客户并使用此处所示的源对象(https://stripe.com/docs/api#create_card)添加一张新卡。但是有了stripe.net,我似乎不知道如何做到这一点,任何指针都会有很大的帮助。
发布于 2016-05-09 22:20:10
我想通了。如果这对这里的任何人都有帮助,那就是我做的方式:
var myCustomer = new StripeCardCreateOptions();
myCustomer.SourceCard = new SourceCard
{
Number = txtnumero.Text,
ExpirationYear = txtyear.Text,
ExpirationMonth = txtmonth.Text,
Cvc = txtCVV.Text
};
StripeCardService NewStripeCardService = new StripeCardService();
StripeCard stripeCustomer = NewStripeCardService.Create(**CustomerID**,myCustomer);发布于 2018-11-24 23:22:36
更新以解决条带API中的更改。
var myCustomerCardNested = new Stripe.CardCreateNestedOptions();
myCustomerCardNested.Number = cardNumber;
myCustomerCardNested.ExpYear = year;
myCustomerCardNested.ExpMonth = month;
myCustomerCardNested.Cvc = CVC;
var myCustomerCard = new Stripe.CardCreateOptions() { SourceCard = myCustomerCardNested };
stripeCustomerCard = NewStripeCardService.Create(stripeCustomer.Id, myCustomerCard);https://stackoverflow.com/questions/37116544
复制相似问题