reactjs - Stripe React Native:商家显示名称不能为空字符串
问题描述
我正在尝试在我的 React Native 应用程序中实现 Stripe React Native SDK,但是当我向用户展示付款单时出现错误。
我按照条纹网站上的教程(https://stripe.com/docs/payments/accept-a-payment?platform=react-native)但我不断收到以下错误:
{"code": "Failed", "declineCode": null, "localizedMessage": "When a Configuration is passed to
PaymentSheet, the Merchant display name cannot be an empty string.", "message": "When a
Configuration is passed to PaymentSheet, the Merchant display name cannot be an empty string.",
"stripeErrorCode": null, "type": null}
我没有找到任何讨论这个问题的论坛。
先感谢您
解决方案
我遇到了同样的错误。重新检查文档后,我发现初始化条带付款表时缺少“merchantDisplayName”参数。
const {error} = await initPaymentSheet({
paymentIntentClientSecret: client_secret,
googlePay: true,
merchantDisplayName: 'Merchant Name',
});
推荐阅读
- clojure - 为什么在 def 中是 '@foo Cons 而不是 PersistentList 的类?
- javascript - 查找未出现在数组中的最小正整数
- rabbitmq - 带有 Celery&RabbitMQ 的 Airflow 多节点集群 - HA RabbitMQ 的 broker_url 设置问题
- c++ - 为什么`T&&`不粘?
- html - 如何对齐引导卡中的 3 个图像以使它们并排?
- javascript - 无法访问 asp.net core api end-poit with next.js 前端 500 内部错误原因:无法验证第一个证书
- javascript - 如何使用正则表达式在逗号后换行
- javascript - 图像闪烁然后消失 HTML
- pine-script - 如何使用 pine 脚本创建策略,以根据我创建的指标的条形颜色变化进行买卖?
- python - Python Selenium Webdriver:无法在浏览器上加载所有评论