简体   繁体   English

Stripe:送货地址未通过 Node/Express 提交

[英]Stripe: Shipping address not submitting via Node/Express

I'm using Node and Express to submit a form to Stripe .我正在使用NodeExpressStripe提交表单。 When I create the new customer for the charge, I submit the related data with it: https://stripe.com/docs/api/node#create_customer当我为费用创建新客户时,我提交相关数据: https : //stripe.com/docs/api/node#create_customer

Everything appears in Stripe's dashboard just fine except shipping address.除了送货地址外,所有东西都出现在 Stripe 的仪表板中。 I'm not getting any errors in command line or console so it's really hard to trouble shoot.我在命令行或控制台中没有收到任何错误,因此很难解决问题。 My only guess is that there's some config I need to pass into Stripe that tells them I'm collecting address.我唯一的猜测是我需要将一些配置传递给 Stripe,告诉他们我正在收集地址。 No idea.不知道。

Any help would be much appreciated!任何帮助将非常感激!

Here's what I've got now.这就是我现在所拥有的。

 stripe.customers.create({ email: req.body.stripeEmail, source: req.body.stripeToken, description: "this is he", metadata: { this: "that", gender: "female", party: "green" }, shipping: { name: "Yuki Matthews", address: { line1: "123 Yukon Ave.", line2: "Suite B", city: "Seattle", state: "Washington", country: "United States", postal_code: "98144" } } })

Your code is correct.你的代码是正确的。 The shipping address is not displayed in the dashboard, but can be retrieved when you retrieve the customer via the API.送货地址不显示在仪表板中,但可以在您通过 API检索客户检索

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM