Sage Pay Form

Open to all! Ask other shopowners for help.
Post Reply
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Sage Pay Form

Post by Xpajun »

Now having a problem with this module - I'm using

Code: Select all

      $this->signature = 'sage_pay|sage_pay_form|2.0|2.3';
      $this->api_version = '3.00';
(if that identifies it)

When I set the module to Test and use the Test Encryption Password everything works as it should
Setting the module to Live, however, using the Live Encryption Password it shows the customer the Test link and then errors because the Encryption Password is wrong

Lines 37 - 57

Code: Select all

      if ( defined('MODULE_PAYMENT_SAGE_PAY_FORM_STATUS') ) {
        if ( MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER == 'Test' ) {
          $this->title .= ' [Test]';
          $this->public_title .= ' (' . $this->code . '; Test)';
        }
      }

      if ( $this->enabled === true ) {
        if ( !tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_LOGIN_NAME) || !tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_ENCRYPTION_PASSWORD) ) {
          $this->description = '<div class="alert alert-warning">' . MODULE_PAYMENT_SAGE_PAY_FORM_ERROR_ADMIN_CONFIGURATION . '</div>' . $this->description;

          $this->enabled = false;
        }
      }

      if ( defined('MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER') && MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER == 'Live' ) {
        $this->form_action_url = 'https://live.sagepay.com/gateway/service/vspform-register.vsp';
      } else {
        $this->form_action_url = 'https://test.sagepay.com/gateway/service/vspform-register.vsp';
      }
    }
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Sage Pay Form

Post by ecartz »

The code looks correct. Maybe check the configuration table in the database and verify that the entry for MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER exists and is set to Live.

You could try adding before that block of code

Code: Select all

die(MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER);
Note that that will definitely break things. But it might give useful information.

You also might use something like the Network tab on Developer Tools (in your browser) to see what redirects are happening.

You might ask Sage (who may have renamed themselves) if this makes sense to them. Perhaps they changed something.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Sage Pay Form

Post by heatherbell »

Xpajun wrote: Sun Sep 05, 2021 4:02 pm Now having a problem with this module
Sorry I do not have a solution but I can only confirm that we are using the same sage_pay_form.php file as core in our live shop and it's working OK. SagePay telephone support has been very good when we have had to use it.
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: Sage Pay Form

Post by Xpajun »

ecartz wrote: Sun Sep 05, 2021 4:39 pm The code looks correct. Maybe check the configuration table in the database and verify that the entry for MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_SERVER exists and is set to Live.

You could try adding before that block of code Note that that will definitely break things. But it might give useful information.

You also might use something like the Network tab on Developer Tools (in your browser) to see what redirects are happening.

You might ask Sage (who may have renamed themselves) if this makes sense to them. Perhaps they changed something.
So I need to blush again - it was a combination of too many admin windows open and database/comfigure issue basically missed changing the database details on the new configure file so the front end was pointing to the wrong database.
I also had a problem with Sage (yes Matt - it's now Opayo (well half of it anyway) part of Elavon) not getting the payment through to Elavon, so I was not getting any payments at all - all sorted this morning though, once again many thanks for your input
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: Sage Pay Form

Post by Xpajun »

heatherbell wrote: Mon Sep 06, 2021 5:44 am
Xpajun wrote: Sun Sep 05, 2021 4:02 pm Now having a problem with this module
Sorry I do not have a solution but I can only confirm that we are using the same sage_pay_form.php file as core in our live shop and it's working OK. SagePay telephone support has been very good when we have had to use it.

Thanks @heatherbell Your post was most useful when I was told that their problem was due to 'Sage Pay Form' not being correct or perhaps the cart itself. When I told them that the platform worked alright with my previous gateway and that you (no names mentioned) were using it on the same platform without a problem...
It was sorted mind you I think it may be a case that some of the tech staff will do their best to sort your problem while others can't be bothered

Anyway thanks again
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply