【发布时间】:2022-11-01 16:54:21
【问题描述】:
通过 UPI 应用程序付款后,我以某种方式试图获取状态(错误、成功)。我已经结束了 onAdditionalDetails() 函数,但在这里我不知何故无法查询状态。是否需要在状态对象中获取此信息?
async initAdyen() {
let config = null;
config = {
...this.config.adyenConfig,
onAdditionalDetails: (state, component) => {
// here i need some condition if the payment via app was successful or not
const obj = // the object
component.props.createFromAction(obj, {}).mount("#id");
},
};
AdyenInit(config)
.then((checkout)=> {
//implementation
})
.catch((error) =>{
console.error(`url failure ${error.message}`);
});
},
我也可以使用 createFromAction() 重定向到下一页,但这只会在 Success 和 Error 中发生。但是,这应该只发生在 Success 中。我希望这是可以理解的。非常感谢
【问题讨论】:
标签: javascript web upi adyen