Page 1 of 1

Sage Pay Form

Posted: Sun Sep 05, 2021 4:02 pm
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';
      }
    }

Re: Sage Pay Form

Posted: Sun Sep 05, 2021 4:39 pm
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.

Re: Sage Pay Form

Posted: Mon Sep 06, 2021 5:44 am
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.

Re: Sage Pay Form

Posted: Tue Sep 07, 2021 2:06 pm
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

Re: Sage Pay Form

Posted: Tue Sep 07, 2021 2:15 pm
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