-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Referrer Request Header in form post #24
Comments
We've narrowed the issue down to the missing referrer request header - by testing with the referrer manually added using the 'referer control' chrome extension the live setup works. So how can we add the referrer header to the request? I've tried setting the referrer meta tag of the hpp and parent page to 'origin' but it makes no difference. |
@MathewWoodhall - Did you solve this? I have exactly the same issue. |
I came up with the following work around which has been fine for us for the past few months. If I remember right the issue stems from the iframe needing a src attribute(without one the referrer and origin will not be sent with the initial request to https://pay.elavonpaymentgateway.com/pay) so we changed the iframe html to:
and loading-iframe.html has the following content:
When initting the hpp you will see 'Loading...' breifly and the request to 'https://pay.elavonpaymentgateway.com/pay' should have the required origin and referrer. Hope this helps. |
Hi, I have the same issue after we updated to the newest version of this library. With older version it did make any difference if 'Origin' was null or not. It does make difference now. As @MathewWoodhall mentioned it works fine if we request to snadbox, but as soon as we set domain to 'https://pay.realexpayments.com/pay' then we get error. This code we added to our checkout page: $(document).ready(function () { 'data' comes from backend (we use https://github.com/realexpayments/rxp-hpp-php): $realexHpp = new \com\realexpayments\hpp\sdk\RealexHpp($sharedSecret); I could not resolve it so far. Any help is much appreciated. |
I have the exact same issue. the solution from @MathewWoodhall which seems to work on our dev server but it is inconsistent so sometimes the iframe loads other times it does not. So this is definitely a problem. I played around with the rxp-js code to see if I can get it working but it does not want to work at all. |
Any progress on this one? |
I have used the same solution as @MathewWoodhall, where the iframe must initially load a local page with in the head, which ensures the Origin and Referrer headers are set. I also then encountered the same issue described by @heinrich-fresh, where sometimes the iframe would not load, i.e. sometimes it would be stuck on "Loading...". I believe the issue was caused by identifying when to call the RealexHpp.embedded.init() method. You cannot load it on $(document).ready() because this is when the parent document is loaded, not the document within the iframe src (which we need for the Origin and Referrer headers to be correct). I then tried using the iframe's load() event, but this proved inconsistent. My current solution utilizes JS postMessage function, so the iframe tells the enclosing document when to call it. This will only work if the iframe src document is in the same origin as the enclosing document. So the iframe src document includes:
The enclosing document includes:
|
Hi,
we have an issue with our implementation using the embedded method. Everything is working great in sandbox mode but once we remove sandbox and switch to live we get...
'505 You cannot use this service from there null Please contact the merchant.'
Looking at the request headers for the form data post to https://pay.elavonpaymentgateway.com/pay we can see Origin: null. Also no referrer header is present in the headers. Is this causing the 505 error?
Anyone ran into this issue or know of a solution?
Thanks for any help.
The text was updated successfully, but these errors were encountered: