我正在按照本教程从格子 API 获取交易/帐户详细信息。格子快速入门指南用户 ejs 以便使用 onSuccess 函数发送到服务器。如何使用 ionic 创建此令牌?
格子快速指南还建议我们使用代码打击
var linkHandler = Plaid.create({
env: 'sandbox',
clientName: 'Client Name',
key: '<PUBLIC_KEY>',
product: ['auth', 'transactions'],
token: '<GENERATED_PUBLIC_TOKEN>',
onSuccess: function(public_token, metadata) {
// You do not need to repeat the /item/public_token/exchange
// process when a user uses Link in update mode.
// The Item's access_token has not changed.
},
并建议使用此代码
// Create a public_token for use with Plaid Link's update mode
client.createPublicToken(ACCESS_TOKEN, (err, result) => {
// Handle err
// Use the generated public_token to initialize Plaid Link in update
// mode for a user's Item so that they can provide updated credentials
// or MFA information
const publicToken = result.public_token;
});
为了创建公共令牌并获取访问令牌。我无法使用此功能,因为我收到错误“格子和/或未定义客户端”
如何使用 Ionic 前端和节点后端创建此公共令牌?
这里的工作流程是什么?
提前致谢