CubeCart Bot Posted February 6, 2018 Share Posted February 6, 2018 Name: Opayo (Form) Price: Free Category: Payment Gateways Homepage: https://www.cubecart.com/extensions/payment-gateways/sagepay-form Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted May 30, 2018 Share Posted May 30, 2018 This great payment gateway doesnt work under PHP 7.2 (PHP 7.1 works but gives a deprecated warning) as mcrypt (which this code relies on) has been removed in PHP 7.2 See https://github.com/cubecart/v6/issues/2043 Quote Link to comment Share on other sites More sharing options...
Lastwolf Posted June 6, 2018 Share Posted June 6, 2018 1.0.7 update seems to stop the ability to update Cubecart with payment transaction data. Quote Link to comment Share on other sites More sharing options...
eduardj Posted September 18, 2022 Share Posted September 18, 2022 I've updated to latest cc 6.4.7 and to PHP8.xx, it wont update captured payments in cube cart admin, have to update manually : modules/gateway/SagePay/gateway.class.php:119 - Attempt to assign property "start" on null Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 18, 2022 Share Posted September 18, 2022 (edited) There is mention of a backward incompatibility with PHP8 vs PHP7: "Attempting to read a property of a non-object." We can assume similar incompatibilities with respect to writing, as well as using the 'property accessor' operator to work with arrays. So, the following edits is an experiment that uses array index syntax: In the SagePay module, gateway.class.php file: Near lines 119 and 120, find: $resultArray[$i]->start = $start; $resultArray[$i]->token = $Tokens[$i]; Change to: $resultArray[$i]['start'] = $start; $resultArray[$i]['token'] = $Tokens[$i]; Near line 129, find: $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1; Change to: $valueStart = $resultArray[$i]['start'] + strlen($resultArray[$i]['token']) + 1; Near line 132, find: $output[$resultArray[$i]->token] = substr($thisString, $valueStart); Change to: $output[$resultArray[$i]['token']] = substr($thisString, $valueStart); Near lines 134 and 135, find: $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2; $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength); Change to: $valueLength = $resultArray[$i+1]['start'] - $resultArray[$i]['start'] - strlen($resultArray[$i]['token']) - 2; $output[$resultArray[$i]['token']] = substr($thisString, $valueStart, $valueLength); Edited September 18, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
eduardj Posted September 18, 2022 Share Posted September 18, 2022 21 minutes ago, bsmither said: There is mention of a backward incompatibility with PHP8 vs PHP7: "Attempting to read a property of a non-object." We can assume similar incompatibilities with respect to writing, as well as using the 'array accessor' operator to work with arrays. So, the following edits is an experiment that uses array index syntax: In the SagePay module, gateway.class.php file: Near lines 119 and 120, find: $resultArray[$i]->start = $start; $resultArray[$i]->token = $Tokens[$i]; Change to: $resultArray[$i]['start'] = $start; $resultArray[$i]['token'] = $Tokens[$i]; Near line 129, find: $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1; Change to: $valueStart = $resultArray[$i]['start'] + strlen($resultArray[$i]['token']) + 1; Near line 132, find: $output[$resultArray[$i]->token] = substr($thisString, $valueStart); Change to: $output[$resultArray[$i]['token']] = substr($thisString, $valueStart); Near lines 134 and 135, find: $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2; $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength); Change to: $valueLength = $resultArray[$i+1]['start'] - $resultArray[$i]['start'] - strlen($resultArray[$i]['token']) - 2; $output[$resultArray[$i]['token']] = substr($thisString, $valueStart, $valueLength); Thanks a lot, I've just run those changes and it works as a charm ! Quote Link to comment Share on other sites More sharing options...
StitesS1 Posted October 12, 2022 Share Posted October 12, 2022 I use Sage to process all credit card sales for our company. It is easy to use and was easy to set up. The reports are easily accessible. … Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 5, 2022 Share Posted December 5, 2022 Thanks so much @eduardj I released 1.0.12 with your patches. Quote Link to comment Share on other sites More sharing options...
Frank Auffret Posted March 5 Share Posted March 5 A customer received an email from Opayo saying the payment system needs to be updated before March 31st I have installed the latest Opayo extension but the site runs on PHP 7.2. Will SagePay-1.0.13.zip work on PHP 7.2? If not what's the alternative? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 5 Share Posted March 5 Yes please use SagePay-1.0.13.zip. It should be fine with PHP 7.2 but 7.4 would be safer. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.