Phonegap : Set Request Headers for POST

0
I'm working on a Mendix app that utilizes a payment gateway. The payment gateway requires a request header to include the request URL to be the same as the URL registered. So if I register my app's URL (e.g. test.myapp.com) on the payment gateway account, the POST request must also come from test.myapp.com. This works on web app since all interaction is from the same URL. However, on hybrid app, this is not the case. The payment gateway refused the request since the request URL is different than the registered URL.   I have checked using Chrome Developer Tools and found out that the Request Headers, specifically on the hybrid app, the header "Origin" is null. I have tried to use some ways to manipulate this, found a cordova plugin( https://github.com/wymsee/cordova-HTTP ) which I thought might help. However, I'm not able to change the Request Header using this plugin, at least after I tried to follow the documentation provided.   Does anyone have any advice on this? Thanks!
asked
0 answers