英文:
Is it possible to get the zipcode from a Stripe payment/card element?
问题
我正在使用Stripe React库的CardElement
(源代码),想知道在Stripe流程提交后是否有任何方法来获取用户输入的邮政编码,可能是从PaymentIntent或其他地方获取?阅读文档后(并考虑到Stripe的整个目的是保护支付数据),我假设不行,但想要确认。
我看到您可以为您的支付元素提供默认值。那么,是请求在Stripe流程之前单独输入邮政编码的唯一/最佳解决方案,然后将其存储起来,然后在加载Stripe元素时将其用作默认值吗?
英文:
I'm using the Stripe react library's CardElement
(source) and was wondering if there's any way to fetch the zip code a user enters from the Stripe flow after submission, possibly off the PaymentIntent or elsewhere? After reading the docs (and considering the whole point of Stripe is to insulate the payment data) I'm assuming not but wanted to be sure.
I did see you can provide a default value for your payment element. So is the only/best solution to request a zip code separately before the Stripe flow, store it off, and then use it as the default value when then loading the Stripe element?
答案1
得分: 0
Stripe不会通过其支付或卡元素公开客户的邮政编码。这是出于安全和隐私原因。Stripe遵循严格的PCI-DSS合规指南,其中优先考虑敏感付款信息的保护。
如果您需要客户的邮政编码以满足您的业务需求,您可以在结账流程中包含一个单独的输入字段,以从客户那里收集邮政编码。
英文:
Stripe does not expose the customer's ZIP code through its payment or card element. This is due to security and privacy reasons. Stripe follows strict PCI-DSS compliance guidelines, which prioritize the protection of sensitive payment information.
If you require the customer's ZIP code for your business purposes, you can include a separate input field in your checkout flow to collect the ZIP code from the customer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论