【发布时间】: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