当 3D Secure 开启时,Stripe 需要 client_id 参数 - 堆栈:ReactNative,Tipsi,iOS
Stripe wants client_id parameter when 3D Secure is on - Stack: ReactNative, Tipsi, iOS
经过几个小时的开发和挖掘过时的 Tipsi documentation, as well as digging through the Stripe documentation,我无法找到解决问题的方法。
我的堆栈看起来像:
- 客户端:ReactNative 和 Stripe via Tipsi package
- 服务器:Node.js
我只想让我的应用程序客户能够通过信用卡付款。我做了以下方法,这是 Stripe 推荐的。
1. Client/App --> [REQUEST PAYMENT METHOD ID] --> Stripe Server
2. Stripe Server --> [RETURNS PAYMENT METHOD ID] --> Client/App
3. Client/App --> [SEND PAYMENT METHOD ID] --> Server (NodeJS)
4. Server --> [CREATE PAYMENT INTENT w/ STRIPE SECRET KEY] --> Stripe Server
5. Stripe Server --> [SENDS BACK 'OK' OR 'ACTION_REQUIRED'] --> Server
6. Server --> [IF 'ACTION_REQUIRED'] --> Client/App
7. Client/App --> [USER AUTHENTICATION] --> Stripe
8. Stripe --> [PAYMENT DONE] --> Server
没有返回 action_required
时一切正常。因此,当客户输入信用卡详细信息且未向 his/her 银行请求身份验证或 3D 安全时,付款就会完成。但是,当我使用 Stripe 的测试信用卡(信用卡号:4000 0027 6000 3184
)测试我的应用程序时,它总是要求 3D Secure,我的应用程序停止在 Step 6
.
Error: Only Stripe Connect platforms can work with other accounts. If you specified a
client_id parameter, make sure it's correct. If you need to setup a Stripe Connect platform,
you can do so at https://dashboard.stripe.com/account/applications/settings.
我在第 7 步执行以下调用:
import Stripe from 'tipsi-stripe';
Stripe.setOptions({
publishableKey: 'pk_test_51IA2...Ji7tr',
merchantId: '<MERCHANT_ID>',
androidPayMode: 'test',
});
Stripe.setStripeAccount(null)
const handleAuthenticationChallenge = async () => {
let response = null
try {
const authResponse = await Stripe.authenticatePaymentIntent({
clientSecret: stripeClientSecret
})
} catch (e) {
console.error(e)
}
return response
}
似乎我使用函数 Stripe.authenticatePaymentIntent
不正确,但我找不到任何相关信息,无论是 Tipsi, nor with Stripe.
我需要申请 Stripe Connect 才能获得 client_id
吗?我只想进行基本的支付交易。
当您尝试检索不属于您自己的帐户(例如 GET /v1/accounts/acct_123
)而不是 Connect 平台时,会发生该错误。
问题可能是由于线路
Stripe.setStripeAccount(null)
您将使用它来指定您正在代表 connected account 执行 Stripe API 请求。将其设置为 null
而最初未将其设置为有效帐户 ID 可能会在 tipsi-stripe 中做一些奇怪的事情。如果您打算在您自己的 Stripe 帐户上提出请求,我会尝试完全删除该行。
经过几个小时的开发和挖掘过时的 Tipsi documentation, as well as digging through the Stripe documentation,我无法找到解决问题的方法。
我的堆栈看起来像:
- 客户端:ReactNative 和 Stripe via Tipsi package
- 服务器:Node.js
我只想让我的应用程序客户能够通过信用卡付款。我做了以下方法,这是 Stripe 推荐的。
1. Client/App --> [REQUEST PAYMENT METHOD ID] --> Stripe Server
2. Stripe Server --> [RETURNS PAYMENT METHOD ID] --> Client/App
3. Client/App --> [SEND PAYMENT METHOD ID] --> Server (NodeJS)
4. Server --> [CREATE PAYMENT INTENT w/ STRIPE SECRET KEY] --> Stripe Server
5. Stripe Server --> [SENDS BACK 'OK' OR 'ACTION_REQUIRED'] --> Server
6. Server --> [IF 'ACTION_REQUIRED'] --> Client/App
7. Client/App --> [USER AUTHENTICATION] --> Stripe
8. Stripe --> [PAYMENT DONE] --> Server
没有返回 action_required
时一切正常。因此,当客户输入信用卡详细信息且未向 his/her 银行请求身份验证或 3D 安全时,付款就会完成。但是,当我使用 Stripe 的测试信用卡(信用卡号:4000 0027 6000 3184
)测试我的应用程序时,它总是要求 3D Secure,我的应用程序停止在 Step 6
.
Error: Only Stripe Connect platforms can work with other accounts. If you specified a
client_id parameter, make sure it's correct. If you need to setup a Stripe Connect platform,
you can do so at https://dashboard.stripe.com/account/applications/settings.
我在第 7 步执行以下调用:
import Stripe from 'tipsi-stripe';
Stripe.setOptions({
publishableKey: 'pk_test_51IA2...Ji7tr',
merchantId: '<MERCHANT_ID>',
androidPayMode: 'test',
});
Stripe.setStripeAccount(null)
const handleAuthenticationChallenge = async () => {
let response = null
try {
const authResponse = await Stripe.authenticatePaymentIntent({
clientSecret: stripeClientSecret
})
} catch (e) {
console.error(e)
}
return response
}
似乎我使用函数 Stripe.authenticatePaymentIntent
不正确,但我找不到任何相关信息,无论是 Tipsi, nor with Stripe.
我需要申请 Stripe Connect 才能获得 client_id
吗?我只想进行基本的支付交易。
当您尝试检索不属于您自己的帐户(例如 GET /v1/accounts/acct_123
)而不是 Connect 平台时,会发生该错误。
问题可能是由于线路
Stripe.setStripeAccount(null)
您将使用它来指定您正在代表 connected account 执行 Stripe API 请求。将其设置为 null
而最初未将其设置为有效帐户 ID 可能会在 tipsi-stripe 中做一些奇怪的事情。如果您打算在您自己的 Stripe 帐户上提出请求,我会尝试完全删除该行。