Javascript 在源卡上标记V3持卡人姓名
我有一个MVC项目,面临一个关于条带流的问题。任何帮助都将不胜感激 下面是我的流程Javascript 在源卡上标记V3持卡人姓名,javascript,c#,stripe-payments,stripes,Javascript,C#,Stripe Payments,Stripes,我有一个MVC项目,面临一个关于条带流的问题。任何帮助都将不胜感激 下面是我的流程 我正在使用stripe js v3版本从UI创建卡片令牌。有了这段代码,我可以从stripe中完美地检索卡和令牌 stripe.createToken(card, { name: name }).then(function (result) { if (result.error) { // Inform the customer that there was an error.
- 我正在使用stripe js v3版本从UI创建卡片令牌。有了这段代码,我可以从stripe中完美地检索卡和令牌
stripe.createToken(card, { name: name }).then(function (result) { if (result.error) { // Inform the customer that there was an error. } else { // stripeTokenHandler will post the form to back end with token, here we are getting card with proper name, // but we are just sending token to back end stripeTokenHandler(result.token); } });
- 然后我进一步使用该令牌创建了一个带C#后端代码的条带源,因为我使用了stripe.net,下面的版本=37.15.0.0m就是代码
// creating a stripe customer, consider this is working fine Stripe.Customer customer = GetCustomerService().Create(options, requestOptions); // create the credit card source and attach it to the current StripeCustomerId var options = new Stripe.SourceCreateOptions() { Type = "card", Token = token, }; var requestOptions = new Stripe.RequestOptions(); if (stripeAccountId.IsNotEmpty()) requestOptions.StripeAccount = stripeAccountId; Stripe.Source source = null; try { source = GetSourceService().Create(options, requestOptions); } catch (StripeException ex) { msgs.Add(ex.Message, MessageType.UserError, ex); msgs.Add($"Payment source was not created", MessageType.UserError); }
- 这就是我检索条带源的方法
List<Stripe.Source>() sources = GetSourceService().List(customerId).ToList();
List()sources=GetSourceService().List(customerId.ToList();
- 这一切都很好,但检索到的源代码不包含持卡人的姓名,这是我们创建和检索令牌时的姓名。我试图查看文档,但运气不佳
- 我认为这是流程中的问题,我可能遗漏了一些片段,但不确定是什么。再次重申,任何帮助都将不胜感激。谢谢