【问题标题】:Adyen UPI client integration get statusAdyen UPI 客户端集成获取状态
【发布时间】: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


    【解决方案1】:

    您应该定义 onPaymentCompleted 处理程序

    onPaymentCompleted: (result, component) => {
        console.log(result);
    

    result 变量包括 resultCode(请参阅 https://docs.adyen.com/online-payments/payment-result-codes

    【讨论】:

      猜你喜欢
      • 2013-05-07
      • 1970-01-01
      • 2018-02-25
      • 2016-02-07
      • 2017-04-23
      • 1970-01-01
      • 2018-03-31
      • 2020-04-10
      • 1970-01-01
      相关资源
      最近更新 更多