使用节点js在网络中paytm支付成功后重定向回应用程序问题

Redirect back to the app Issue after paytm payment success in web using node js

在 nodejs 中实现了 paytm 支付逻辑。付款成功后,它不会重定向到成功消息,只是在生产环境中显示 "Redirect back to the page"。下面是我的代码。还附上截图。如果我有什么遗漏,请帮助我。enter image description here

 app.post('/payment', urlencodedParser, (req,res)=>{

    let reqbody = req.body;
    let orderId = 'order_'+ Math.random().toString(36).substring(7);
    let params = {}
    params['MID'] = 'My Merchant Id',
    params['WEBSITE'] = 'DEFAULT',
    params['CHANNEL_ID'] = 'WEB',
    params['INDUSTRY_TYPE_ID'] = 'Retail',
    params['ORDER_ID'] = orderId,
    params['CUST_ID'] = 'CUST' + Math.random().toString(36).substring(7),
    params['TXN_AMOUNT'] = '1',//+reqbody.money+'',
    params['CALLBACK_URL'] = 'https://securegw.paytm.in/theia/paytmCallback?ORDER_ID='+orderId+'',
    params['EMAIL'] = 'myemail@gmail.com',
    params['MOBILE_NO'] = '9999999999',

    checksum_lib.genchecksum(params, '9KBKBVjiB3ml5TSP', function(err, checksum){
        let txn_url = 'https://securegw.paytm.in/order/process';
        let form_fields =''
        for(x in params){
            form_fields +="<input type='hidden' name = '"+x+"' value = '"+params[x]+"'/>"
        }

        form_fields +="<input type='hidden' name = 'CHECKSUMHASH' value = '"+checksum+"' />" 

        var html = '<html><body><center><h1>Please wait! Do not refresh the page </h1></center><form method="post" action="'+txn_url+'" name="f1">'+form_fields+'<script type="text/javascript">document.f1.submit()</script></body></html>'

        res.writeHead(200, {'Content-Type':'text/html'})    
        res.write(html)
        res.end()
    })
})

请使用您自己的回调 URL 而不是 https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=。 以上回调 URL 仅适用于应用程序。所以需要在参数params['CALLBACK_URL'].

中替换自己的回调URL