android - 目标参数必须是关联账户

标签 android stripe-payments

我使用 stripe 库进行支付。没有目标参数也不异常(exception),但是当我添加此参数时,出现此异常“目标参数必须是连接的帐户”。

Stripe.apiKey = "sk_test_...";

Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.put("amount", 1000);
chargeParams.put("currency", "usd");
chargeParams.put("source", {TOKEN});
chargeParams.put("destination", {CONNECTED_STRIPE_ACCOUNT_ID});

Charge.create(chargeParams);

对不起我的英语。

最佳答案

创建费用时 through the platformdestination 参数必须设置为您接受付款的帐户的 ID。

在 Stripe 网站和您的问题中的示例代码中,您必须将 {CONNECTED_STRIPE_ACCOUNT_ID} 替换为实际的帐户 ID。帐户 ID 是以 acct_ 开头后跟随机字母数字字符的字符串。

如果您的平台正在使用 standalone accounts , 然后你在 last step of the OAuth flowstripe_user_id 参数中得到账户 ID .

如果您的平台正在使用 managed accounts ,然后您在 create an account 时获得帐户 ID , 在 id参数。

关于android - 目标参数必须是关联账户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40468204/

相关文章:

Android stripes获取用户名片

python - Stripe 支付 APIConnection 错误

c# - 使用 Stripe 的 Payment Intent API 接受 Xamarin 表单中的付款

android - 在 Realm 中执行简单的迁移

java - developer.android.com 上的 editText.setOnEditorActionListener 错误

javascript - Stripe 形式不创建 token

web-applications - 有什么方法可以接受来自非 native Web 应用程序的读卡器的信用卡刷卡吗?

android - onServiceConnected 是否仅在 Service onCreate 之后调用?

android - java.lang.UnsatisfiedLinkError 在某些设备上崩溃

android - 后台扫描中的华为蓝牙行为