0

我在使用 BlueSnap API 为回头客实施 3D 安全流程时遇到问题(https://developers.bluesnap.com/docs/3-d-secure-for-api#section-3-d-secure-with-回头客)。问题是设置回调似乎没有触发。

运行以下代码,日志中只会显示“3DS:开始”和“3DS:BlueSnap 启动”:

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");
});

为什么从不调用回调?

4

1 回答 1

0

这有点令人困惑,但是设置函数的回调不会在设置完成时被调用。点击提交,3DS流程完成后调用(用于返回最终结果给你)。所以尝试继续流程并调用 bluesnap.threeDsPaymentsSubmitData() 然后检查是否调用了回调。

于 2020-07-02T19:24:05.873 回答