Module

Developer
Supported

BrilliantRetail SagePay Form Payment Gateway

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Glenn Jacobs

     

You must be logged in to post.

Patmeny Gateway System Mode not changing

Bug Report

Logo Design UK
Logo Design UK

When changing the System Mode on the Payment gateways settings from Simulator to Test, the checkout process still goes to the Sagepay simulator site.

The error seems to be in the file: gateway.sage_pay_form.php

      if ($sagepay_config[‘connect_to’] == “LIVE”)
      {
        $sagepay_config[‘purchase_url’] = “https://live.sagepay.com/gateway/service/vspform-register.vsp”;
      }
      elseif ($sagepay_config[‘connect_to’] == “TEST”)
      {
        $sagepay_config[‘purchase_url’] = “https://test.sagepay.com/gateway/service/vspform-register.vsp”;
      }
      else // simulator
      {
        $sagepay_config[‘purchase_url’] = “https://test.sagepay.com/simulator/VSPFormGateway.asp”;
      }

      return $sagepay_config;

If I change to check for lowercase live and test it works.

      if ($sagepay_config[‘connect_to’] == “live”)
      {
        $sagepay_config[‘purchase_url’] = “https://live.sagepay.com/gateway/service/vspform-register.vsp”;
      }
      elseif ($sagepay_config[‘connect_to’] == “test”)
      {
        $sagepay_config[‘purchase_url’] = “https://test.sagepay.com/gateway/service/vspform-register.vsp”;
      }

You might want to update the code.

Regards,

Darrell

glennj
# 1
Developer
glennj

Thanks, I’m updating the system now.

glennj
# 2
Developer
glennj

A new version has been uploaded to Devotee which should fix this problem.