我在使用 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");
});
为什么从不调用回调?