Stripe React Native:商家显示名称不能为空字符串

blo*_*uuu 2 stripe-payments reactjs react-native

我正在尝试将 Stripe React Native SDK 实现到我的 React Native 应用程序中,但当我向用户提供付款单时出现错误。

我按照 stripe 网站上的教程进行操作(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}
Run Code Online (Sandbox Code Playgroud)

我没有找到任何讨论这个问题的论坛。

先感谢您

Yeh*_*hya 9

我遇到了同样的错误。重新检查文档后,我发现初始化条带付款表时缺少“merchantDisplayName”参数。

const {error} = await initPaymentSheet({
  paymentIntentClientSecret: client_secret,
  googlePay: true,
  merchantDisplayName: 'Merchant Name',
});
Run Code Online (Sandbox Code Playgroud)

  • 这确实是我的问题的解决方案。我与 Stripe 支持人员交谈,他们告诉我:“如果您遵循本指南,则需要添加商家显示名称。文档中缺少该名称” (3认同)