I am using this module for Global Payments / Realex Payments for Magento 2.2.2 store form Magento Marketplace

"name" : "realexpayments/hpp",
"description" : "A Magento 2 module for Global Payments HPP payments",
"type" : "magento2-module",
"version" : "2.0.0",

Using Hosted Payment Page in One Step Checkout - Embedded HPP

After user completes a successful transaction they are not being correctly redirected to the correct url page and the order is not showing in my admin emails - been having this problem for months now with no help from Global Payments at all - very frustrated they not answering calls or emails!

I am unable to process the order and complete it. And get confused as to payed orders and failed already sent out several orders when they were no payed for by mistake because of this problem

If we select other payment options such as Bank Transfer the order and emails goes through fine and it redirects user to success page


I get instead emails see below

/ 511 Alerts

Please be advised the following alert(s) appeared on our system as we were unable to connect to your response page. Time Account Order ID URL / IP https://www.mydomain.co.uk/realexpayments_hpp/process/result

Explanation of this alert in more detail: As you are using the Hosted Payments Page, this means that your customer is redirected to a secure payment page hosted on the Global Payments servers to enter their card details. Once the transaction is processed, we return the transaction response - and your customer - to a nominated response page on your servers. In this instance we could not connect with your response page to notify you of the transaction response, and so this alert was generated. What do you need to do? This particular transaction may have been successfully authorised but as we could not connect to your response page, it is important that you check the status of this transaction to ensure no orders are missed. The RealControl reporting tool can be used to check the status of this transaction. Why does this happen? As all communication with your response page happens via the open channels of the internet, connections can be dropped from time to time which will result in a 511 alert. A high incidence of 511 alerts may indicate an issue with your response page and may warrant further investigation. If this occurs, Global Payments can enable logging on your transactions, which will allow us to get more information around the response received from your particular server, which may help determine the source of the problem. Additional Configuration Information: We recommend you set Success and Failure text which will be displayed to the customer in the event we can't connect back to your response page by navigating to the Client Settings section of RealControl. Kind regards, Global Payments ECOM Support

I am unable to upgrade to Magento 2.3 or higher because the site has many extensions and personalisation which is not yet compatible - and the extension version HPP 2.0.0 is the only one we can install on Magento 2.2.2 Please help this is nightmare

3 Answers 3


You can edit the code in the file Base.php. You can find this path: vendor/realexpayments/hpp/Controller/Process/Result/Base.php

Update code in execute().

$this->_view->getLayout()->createBlock('\RealexPayments\HPP\Block\Process\Result', 'rp.hpp');   
        $resp = '<div>Processing your payment...</div>';    
        if (isset($params['returnUrl'])) {  
            $resp .= '  
                window.setTimeout(() => {   
                    window.top.location = "' . $params['returnUrl'] . '";   
                }, 1000);   

Add this code to the bottom of the function.

Hope this works. Try to override this file in your app/code folder.


I had faced many issue regarding global payment. You need to first whitelist your response URL in global payment merchant account by sending email and also asked them to enable 3D SCA in your account.

  • thanks for the reply correct however this has already been done doesnt fix issue after successful payment customer is kept on same onepage checkout and not taken to success page - means no sale order emails to admin or customer
    – jt9489
    Commented Jan 15, 2021 at 12:36
  • Okay so you need to add code that forcefully redirect to success page. I will send you code to override which file and what to change
    – Sheba
    Commented Jan 15, 2021 at 19:59
  • that will be very kind sehba thanks
    – jt9489
    Commented Jan 17, 2021 at 13:02
  • Hi Sheba just checking to see if you can send the code and file changes you mentioned in your last message please
    – jt9489
    Commented Jan 19, 2021 at 12:35
  • Hi I’m facing similar problems- were you able to resolve this? Commented Feb 8, 2022 at 1:07

Had a very similar issue with Global Payments recently. I'm hoping this helps someone because I spent a while trying to solve it and it was really simple in the end.

  • Magento 2.4.6
  • RealexPayments_Hpp 1.1.1

My particular problem was very similar. Global were notifying my client of the 511 errors.

When I processed the payment, I got the dreaded Your transaction has been successful but there was a problem connecting back to the merchant's website error. This is Global trying to redirect back to the /realexpayments_hpp/process/sessionresult controller. In my case, it wasn't even getting to that point.

After checking my exception.log, amongst the errors was this one:

main.CRITICAL: Error: Class "Monolog\Logger" not found in /var/www/vhosts/website.co.uk/httpdocs/vendor/magento/framework/Logger/Monolog.php:16

That line was class Logger extends \MonoLog\Logger. I changed it to class Logger extends \Monolog\Logger (no camel case on MonoLog) and BAM my order went straight through.

I've notified the developers of the plugin so hopefully this will be patched in the next release.

Like I say, this post is nearly 3 years old but I hope this helps some poor sap like myself.

Even so, for anyone encountering this error, check for 500 errors in your logs. It's likely going to be a local thing.

Right, time for a beer to celebrate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.