首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >plaid + stripe ach支付集成

plaid + stripe ach支付集成
EN

Stack Overflow用户
提问于 2016-09-16 17:57:11
回答 2查看 1.7K关注 0票数 1

我正在集成使用plaid + stripe api来获取付款,但是在获取帐户id和public_token之后,我无法从plaid中获取stripe_bank_account_token来调用curl请求

我正在使用php,这里是请求

代码语言:javascript
复制
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]"

响应为{“沙盒”:true,"access_token":"test_chase“}

我拿不到

代码语言:javascript
复制
{
  "sandbox": true,
  "access_token": "[Plaid API access token]",
  "stripe_bank_account_token": "btok_5gr1QIfvhgEKdYSr17rH",
  "account_id": "[Plaid Account ID]"
}

此响应

EN

回答 2

Stack Overflow用户

发布于 2016-09-20 11:54:52

您需要确保传递的客户端ID和Secret不是沙箱凭据,而是您的实际客户端ID和secret,因为它们连接到您的条纹帐户。

票数 0
EN

Stack Overflow用户

发布于 2017-11-28 16:30:11

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

代码语言:javascript
复制
<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,该work将在最后一个请求中使用,该请求不适用于您。

我希望这能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39528628

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档