简体   繁体   English

条纹支付与 React 的集成

[英]Stripe Payment integration with React

I'm trying to integrate Stripe payment method into React application.我正在尝试将 Stripe 支付方式集成到 React 应用程序中。 I have followed Stripe offical documentation and installed all required libraries.我遵循了 Stripe 官方文档并安装了所有必需的库。 I'm using PaymentElement for collecting the card details such as card number, expiry date, CVC number, postcode.我正在使用 PaymentElement 收集卡详细信息,例如卡号、到期日期、CVC 编号、邮政编码。 How could I check if all the card details are provided on a button click;我如何检查是否在单击按钮时提供了所有卡详细信息; if not, alert them to the text fields so that they add the payment details please?如果没有,请提醒他们注意文本字段,以便他们添加付款详细信息?

Thanks for your help in advance.提前感谢您的帮助。

Regards Mahesh问候马赫什

The PaymentElement does have validations built-in for these checks. PaymentElement 确实为这些检查内置了验证。 Are you not seeing any error messages or any pointers to missing fields?您是否没有看到任何错误消息或任何指向缺失字段的指针? It works for me.这个对我有用。

截屏

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

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