Hello Everyone !
How can we redirect to a http URL along with form data.
I am integrating a payment gateway and want to redirect to payment gateway site through a controller. But we have some credentials to access the URL. So we have to pass these credentials in form data with redirect request.
Here is my controller:
@http.route('/payment/gateway/nift/post', type='http', auth='public', website=True)
def payment_gateway_nift_post_request(self, **kw):
payload = {
'pp_Version': 1.1,
'pp_Language': 'EN',
'pp_MerchantID': 'abc',
'pp_SubMerchantID': 'abcsub',
'pp_Password': '123',
'pp_TxnRefNo': '222',
'pp_Amount': 10000,
'pp_TxnCurrency': 'PKR',
'pp_TxnDateTime': '20201214135136',
'pp_BillReference': 'Cart0011',
'pp_Description': 'Payment for 3Item(s) bought',
'pp_TxnExpiryDateTime': '20201214135436',
'pp_ReturnURL': 'return_url',
'pp_SecureHash': '5fab8dcbd2d78508b8c3d9ea41ae7c16bd6e92ceddec04e2323be3c5b9086c74',
}
return werkzeug.utils.redirect('https://uat-merchants-url', payload)
I am using werkzeug.utils.redirect("URL") to redirect to URL, but I am unable to pass access credentials.
How can we do it?
Thank You.