格子 - payment_status_input_needed
我在购物车上工作了格子付款启动,但是由于某种原因,所有付款的状态都为“ payment_status_input_needed”。
另外,只有在拨打“ plaid.create”呼叫时省略了“接收的雷德雷克里”时,我才能上班。如果我包括它,格子会引发以下错误:
display_message: null
documentation_url: "https://plaid.com/docs/?ref=error#invalid-request-errors"
error_code: "INVALID_FIELD"
error_message: "oauth_continuation.link_token does not match session"
error_type: "INVALID_REQUEST"
request_id: "aseWi7KyiQwxuVE"
suggested_action: null
有人遇到这个错误吗?格子的文档似乎没有涵盖这一点。这就是我的功能。
async plaidPay() {
let amount = this.cart[0].item.amount * this.cart[0].quantity;
console.log(window.location.href);
const linkToken = await this.$axios({
method: 'post',
url: 'api/plaid-create-payment',
data: { amount: amount },
config: { headers: { 'Content-Type': 'application/json' }}
})
.then(res => {
return res.data.link_token;
})
.catch(e => {
console.log(e)
})
console.log(linkToken);
const handler = window.Plaid.create({
token: linkToken,
onSuccess: (public_token, metadata) => {
console.log('test 1');
console.log(public_token);
console.log(metadata);
},
onLoad: () => {
console.log('test 2');
},
onExit: (err, metadata) => {
console.log('test 3');
console.log(err);
console.log(metadata);
},
onEvent: (eventName, metadata) => {
console.log('test 4');
console.log(eventName);
console.log(metadata);
},
//required for OAuth; if not using OAuth, set to null or omit:
receivedRedirectUri: window.location.href,
});
handler.open();
}
I've got Plaid payment initiation working on my cart but for some reason, all payments have the status of "PAYMENT_STATUS_INPUT_NEEDED".
Also, I can only get Plaid to work if "receivedRedirectUri" is omitted when making the "plaid.Create" call. If I include it, Plaid throws the following error:
display_message: null
documentation_url: "https://plaid.com/docs/?ref=error#invalid-request-errors"
error_code: "INVALID_FIELD"
error_message: "oauth_continuation.link_token does not match session"
error_type: "INVALID_REQUEST"
request_id: "aseWi7KyiQwxuVE"
suggested_action: null
Has anyone come across this? Plaid's docs don't seem to cover this. This is what my function looks like.
async plaidPay() {
let amount = this.cart[0].item.amount * this.cart[0].quantity;
console.log(window.location.href);
const linkToken = await this.$axios({
method: 'post',
url: 'api/plaid-create-payment',
data: { amount: amount },
config: { headers: { 'Content-Type': 'application/json' }}
})
.then(res => {
return res.data.link_token;
})
.catch(e => {
console.log(e)
})
console.log(linkToken);
const handler = window.Plaid.create({
token: linkToken,
onSuccess: (public_token, metadata) => {
console.log('test 1');
console.log(public_token);
console.log(metadata);
},
onLoad: () => {
console.log('test 2');
},
onExit: (err, metadata) => {
console.log('test 3');
console.log(err);
console.log(metadata);
},
onEvent: (eventName, metadata) => {
console.log('test 4');
console.log(eventName);
console.log(metadata);
},
//required for OAuth; if not using OAuth, set to null or omit:
receivedRedirectUri: window.location.href,
});
handler.open();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这个问题是通过格子支持来处理的,但是对于那些谷歌搜索的后代和好处,问题似乎是您首次启动链接时正在使用
Readyredrecturi
启动。从OAuth流返回后,仅在重新定义链接时才包括此字段。I think this question is being handled by Plaid support, but for posterity and the benefit of those Googling, the issue seems to be that you are launching with
receivedRedirectUri
the first time you launch Link. This field should only be included when reinitializating Link, after returning from the OAuth flow.