1

I setup payment processing via a Hosted Payment Page. I am using a full redirect and made sure to include a full website in the redirect.init method (http://WEBSITE/response.php)

When I do a transaction I get the following errors:

Your transaction has been successful but there was a problem connecting back to the merchant's web site. Please contact the merchant and advise them that you received this error message.

Full Page Redirect Code:

<script>
$(document).ready(function () {
   jsonFromRequestEndpoint = <?php echo $hppJson; ?>;
   RealexHpp.setHppUrl("https://pay.sandbox.realexpayments.com/pay");                    
   RealexHpp.redirect.init("creditSubmit", "https://WEBSITE/response_globalPay.php", jsonFromRequestEndpoint);
   $('#creditSubmit').click();
});
</script>
General Grievance
  • 4,555
  • 31
  • 31
  • 45
BradyG
  • 11
  • 2

2 Answers2

0

You usually get this error when you are testing on a local environment.

If you want to test on a local environment, you need to expose your local environment to the internet - we are using ngrok for this, but you can use any other service that helps you do that.

After you get the URL from the service mentioned above, just replace the WEBSITE with it.

Everything should work as expected after you've done this.

ahumulescu
  • 16
  • 1
  • I have it on a live server, it should work. – BradyG Jun 07 '21 at 13:45
  • 1
    In this case, please contact the Global Payments support team (ecomsupport@globalpay.com), as they will be able to provide you with more information if you provide them with an Order ID you used where this issue occurred. You can also check your server logs at the the moment the HPP should have connected to it and look for any errors reported. – ahumulescu Jun 08 '21 at 08:18
0

Please be sure that you are defining your Hpp Response URL ("https://WEBSITE/response_globalPay.php") only on the client side. Make sure that you are not defining it again in the server side while generating the payment request json.

I was doing the same mistake of defining it on the client side as well as server side code where I was generating the payment request json.