【问题标题】:Stripe - Connecting to Standalone AccountsStripe - 连接到独立账户
【发布时间】:2017-08-06 22:36:24
【问题描述】:

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

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

Stripe.apiKey = mSession.getAccessToken();

虽然网站上的文档说这是我们应该使用的命令,但 android studio 显示它:“无法解析符号 'apiKey'”。

我们遇到的另一个问题是

Account account = Account.retrieve();

Account 类已更改为 BankAccount,现在 BankAccount 类没有 retrieve 函数。

【问题讨论】:

    标签: java android stripe-payments stripe-connect


    【解决方案1】:

    根据Stripe Authentication 文档, 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);
    

    希望对你有帮助。

    【讨论】:

      猜你喜欢
      • 2016-01-09
      • 1970-01-01
      • 2017-12-29
      • 1970-01-01
      • 2018-08-06
      • 2021-04-02
      • 2019-03-24
      • 1970-01-01
      • 2017-07-18
      相关资源
      最近更新 更多