【问题标题】:plaid + stripe ach payment integration格子+条纹 ach 支付整合
【发布时间】:2017-01-24 12:20:11
【问题描述】:

我将使用 plaid + stripe api 集成到每次付款,但在获取帐户 ID 和 public_token 后,我无法从 plaid 获取 stripe_bank_account_token 来调用 curl 请求

我在这里使用 php 请求

curl https://tartan.plaid.com/exchange_token \
   -d client_id="[Plaid client ID]" \
   -d secret="[Plaid secret]" \
   -d public_token="[Plaid Link public_token]" \
   -d account_id="[Plaid Link account_id]"

响应是 { "sandbox": true, "access_token": "test_chase" }

我看不到

{
  "sandbox": true,
  "access_token": "[Plaid API access token]",
  "stripe_bank_account_token": "btok_5gr1QIfvhgEKdYSr17rH",
  "account_id": "[Plaid Account ID]"
}

这个回复

【问题讨论】:

    标签: php plaid


    【解决方案1】:

    您需要确保传递的客户端 ID 和密码不是沙盒凭据,而是您的实际客户端 ID 和密码,因为它们已连接到您的 Stripe 帐户。

    【讨论】:

    • 此答案仅用于推广产品或服务,不透露作者的隶属关系。
    • 谢谢@Charley M,是的,我收到了支持邮件。
    • 经过多次尝试和他们的支持人员的帮助后,我无法将其恢复到开发模式。我在 PROD 模式下通过实验结束了编码。 -不好玩-
    • 这在沙盒模式下不起作用,我无法响应参数“stripe_bank_account_token”
    【解决方案2】:

    我有同样的问题,我用this解决了它,根据你在前端请求中缺少selectAccount的链接,它应该是这样的:

    <script>
    var linkHandler = Plaid.create({
      env: 'sandbox',
      selectAccount: true, /* this is what i have added */
      clientName: 'Stripe/Plaid Test',
      key: '[Plaid key]',
      product: ['auth'],
      selectAccount: true,
      onSuccess: function(public_token, metadata) {
        // Send the public_token and account ID to your app server.
        console.log('public_token: ' + public_token);
        console.log('account ID: ' + metadata.account_id);
      },
      onExit: function(err, metadata) {
        // The user exited the Link flow.
        if (err != null) {
          // The user encountered a Plaid API error prior to exiting.
        }
      },
    });
    
    // Trigger the Link UI
    document.getElementById('linkButton').onclick = function() {
       linkHandler.open();
     };
    </script>
    

    在响应中,他们返回一个account_id,它将在最后一个对您不起作用的请求中使用。

    我希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2022-01-22
      • 2017-09-14
      • 2016-03-29
      • 2020-03-04
      • 2021-08-02
      • 2020-12-30
      • 2021-03-17
      • 2021-11-19
      • 2021-10-08
      相关资源
      最近更新 更多