条带 - 连接到独立帐户

时间:2017-03-15 23:13:11

标签: java android stripe-payments stripe-connect

我们正在构建一个Android应用程序,我们希望将Stripe用作支付平台。

我们发现此github(https://github.com/thiagolocatelli/android-stripe-connect)指定了如何集成独立的Stripe帐户。问题是在认证的最后一步我们应该调用

Stripe.apiKey = mSession.getAccessToken();

虽然网站上的文档说它是我们应该使用的命令,但android工作室显示它:&#34;无法解析符号&#39; apiKey&#39;&#34;。< / p>

我们遇到的另一个问题是

Account account = Account.retrieve();

Account课程已更改为BankAccount,现在retrieve课程没有BankAccount个职能。

1 个答案:

答案 0 :(得分:0)

根据Stripe Authentication doc, Stripe.apiKey用于存储条带请求的API密钥。

替换

Stripe.apiKey = mSession.getAccessToken();

Stripe.apiKey = "[PLATFORM_SECRET_KEY]";

您可以使用Account课程添加多个银行帐户。

检查Managing multiple bank and debit accounts

Stripe.apiKey = PLATFORM_SECRET_KEY;
Account account = Account.retrieve(CONNECTED_STRIPE_ACCOUNT_ID, null);
Map<String, Object> params = new HashMap<String, Object>();
params.put("external_account", "btok_9CUaZTAdbT4G5z"); // ("account","tokenId")
account.getExternalAccounts().create(params);

我希望它对你有帮助。

相关问题