Hi I have an App developed in Ionic v1 and its working fine while making payment from browser , but while making payment from device Android its not redirecting me to the payment gateway page.
https://test.sbiepay.com/secure/AggregatorHostedListener
The payment gateway team said that I need to pass extra header that is Referer in case of Android device then only they will allow the request from android device.
I did every trick to add extra header in case of device but nothing is working.
Can anybody help me in this how could I send extra header with request to payment gateway, in case of android device.
<form name="sendParam" method="post"
action="https://test.sbiepay.com/secure/AggregatorHostedListener">
<input ng-repeat="(key, value) in fields" type="hidden"
name="{{key}}" value="{{value}}" />
<input type="submit" value="enter" style="position:
absolute; left: -9999px"/>
</form>
Above form submit using js. In case of web these header added automatically.
var fields = {
EncryptTrans: response.data.data.EncryptTrans,
merchIdVal: appConfig.merchIdVal
};
if (appConfig.isDevice) {//Device
console.log('Run in device');
$http.defaults.headers.post['Referer'] =
"http://app.ptl.staging.edubold.com/";
$http.defaults.headers.post['Origin'] =
"http://app.ptl.staging.edubold.com/";
openInAppBrowser(fields);
}