【发布时间】:2015-06-20 21:27:09
【问题描述】:
我让这段代码完美地返回了帐户和交易对象,以响应 Plaid MFA 问题。我不确定出了什么问题,因为我(直到它停止工作并且我已经尝试了一些事情)没有触摸代码(据我的回忆),甚至检查了几个以前的工作版本以确保安全。无论如何,给定场景,我现在得到以下错误列表:
1) 如果我尝试使用美国银行 MFA,它会返回一个 MFA,在我回答后它还会返回一个帐户和交易对象。在我的终端中该信息的末尾,它还返回 events.js 85 throw er; // 未处理的错误事件
2) 如果我尝试使用 USAA 或美国银行,我的响应会收到以下错误对象:
{ code: 1203,
message: 'invalid mfa',
resolve: 'The MFA response provided was not correct.',
access_token: 'test_bofa' }
它返回 MFA 问题,当我回答“再次”时,我得到:
{ type: 'questions',
mfa: [ { question: 'You say tomato, I say...?' } ],
access_token: 'test_bofa' }
events.js:85 throw er; // 未处理的“错误”事件
plaid.connect({username: req.body.cardName, password: req.body.cardPass, pin: req.body.pin}, req.body.type,
'test@plaid.com',
function (error, response, mfa) {
if (response == undefined) {
res.send(response);
} else if (response.hasOwnProperty('accounts')) {
res.send(response);
} else if (response.hasOwnProperty("mfa")) {
res.send(response);//If I remove this response it kicks me out right away. But with it, I receive an undefined MFA response.
plaid.step(response.access_token, req.body.answer, function (err, response) {
if (response == undefined) {
res.send(response);
} else if (response.hasOwnProperty("resolve")) {
res.send(response);
} else if (response.hasOwnProperty('accounts')) {
res.send(response);
} else if (response.hasOwnProperty('mfa')) {
res.send(response);
}
}
)
}
else {
response = "error";
response.send("something went wrong with Plaid");
}
}
)
}
【问题讨论】:
-
你是什么意思它会马上把你踢出去?您为该行发回的 JSON 是什么?此外,您是否确认所有这些银行都允许使用 Connect 产品?并非所有银行都允许所有产品。
-
我不确定了,因为我已经修复了这个问题,这个问题是在差不多一个月前提出的。我正在使用 Plaid.Connect 和 MFA。希望我不会再有问题了。
-
如果您愿意分享解决此问题的代码,那对未来的 SO 访问者来说非常有用。只需将其放在您自己问题的答案中并将其标记为已接受即可。谢谢!
-
可以这么说,我没有“修复”它。经过数周的无数个小时的思考之后,我升级到了新的格子库,一旦它启动。这就是“解决”问题的原因。这个库的节点文档比以前的文档有了显着的改进。
标签: plaid