我有一些代码如下,在条纹和格子之间交换令牌,但我的代码抛出错误为bad public_token
.
我在我的应用程序中使用了来自 nugget 的以下 Package 用于 C#
Install-Package Stripe-Plaid-Link
库参考 https://github.com/asciutto990/Stripe-and-Plaid-Link-.NET
public async Task<ActionResult> PlaidAsync(string account_id, string public_token)
{
var plaidApi = new PlaidApi();
try
{
var response = await plaidApi.ExchangeTokenAsync(new ExchangeTokenInput
{
PublicToken = public_token,
AccountId = account_id,
});
var bankToken = response.StripeBankAccountToken;
var accountId = response.AccountId;
var sandbox = response.Sandbox;
var accessToken = response.AccessToken;
}
catch (PlaidException e)
{
var errorMessage = e.Message;
}
return View();
}