【问题标题】:stripe.createPaymentMethod() error on iOS Simulator but works on Android simulatoriOS 模拟器上的 stripe.createPaymentMethod() 错误,但适用于 Android 模拟器
【发布时间】:2022-01-06 06:48:05
【问题描述】:

我在我的 react-native-app 中使用了条带,但我的 iOS 模拟器有问题。 事实上,当使用 android 模拟器时,stripe.createPaymentMethod() 效果很好,但使用 IOS 模拟器时出现此错误:

{"code": "Failed", "declineCode": null, "localizedMessage": "This payment type is not supported yet", "message": "This payment type is not supported yet", "stripeErrorCode": null, "type": null}

InitStripe 代码:

import {initStripe, StripeProvider} from '@stripe/stripe-react-native';
import React, {useEffect} from 'react';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

let Application = () => {

 useEffect(() => {
  let initStrip = async () => {

  await initStripe({
    merchantIdentifier: 'merchant.identifier',
    publishableKey: 'key',
  }).then(res => console.log('init'));};
   initStrip();}, []);

  return <App />;
};

AppRegistry.registerComponent(appName, () => Application);

有人可以帮助我吗?

谢谢

【问题讨论】:

  • 调用stripe.createPaymentMethod()的代码是什么样的?

标签: ios react-native stripe-payments ios-simulator stripes


【解决方案1】:

Stripe ios 模拟器不工作。在真实设备上运行。这就是我所做的,它成功了。

【讨论】:

    猜你喜欢
    • 2020-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-20
    • 1970-01-01
    • 1970-01-01
    • 2013-07-05
    • 1970-01-01
    相关资源
    最近更新 更多