我在使用BlueSnap应用编程接口(https://developers.bluesnap.com/docs/3-d-secure-for-api#section-3-d-secure-with-returning-shoppers)为回头客实现3D安全流时遇到了问题。问题是setup-callback似乎没有触发。
运行以下代码时,日志中只会显示"3DS: Start“和"3DS: BlueSnap initiated”:
console.log("3DS: Start");
if (typeof (window as any).bluesnap !== "object") {
throw new Error("Bluesnap not initiated!");
}
console.log("3DS: BlueSnap initiated");
(window as any).bluesnap.threeDsPaymentsSetup(
threeDSPaymentsToken, // token retrieved using the JSON API
(resp: any) => {
console.log("3DS: Setup");
});为什么回调从未被调用过?
发布于 2020-07-03 03:24:06
这有点令人困惑,但是在安装完成时不会调用setup函数的回调。它在您单击submit并完成3DS流之后调用(它用于将最终结果返回给您)。因此,尝试继续流程并调用bluesnap.threeDsPaymentsSubmitData(),然后检查是否调用了回调。
https://stackoverflow.com/questions/62701969
复制相似问题