2016-09-16 65 views
1

我是整合利用格子条纹+ API来ACH支付,但我不能让从格子stripe_bank_account_token调用卷曲请求获得帐户ID后public_token格子条纹+ ACH支付集成

我是用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]" 

和响应为{ “沙箱”:真 “的access_token”: “test_chase”}

我不能让

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

此回复

回答

0

您需要确保通过的客户端ID和秘密不是沙盒凭证,而是您的实际客户端ID和秘密,因为它们已连接到您的条带帐户。

+0

此答案仅用于宣传产品或服务,不透露作者的关系。 – techydesigner

+0

谢谢@Charley M,是的,我发送邮件支持。 – user3815779

+0

经过多次尝试并获得支持人员的帮助后,我无法将其恢复到开发模式。我结束了在PROD模式下的实验编码。 -not fun- –

0

我有同样的问题,我解决它使用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这将用于最后一个不适合你的请求。

我希望这会有所帮助。