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...
ronniebb Posted April 12 Share Posted April 12 Hi I have just installed cubecart but when I go through payment it results in a blank screen the order is made in admin, but there is no success page showing - how do I fix (I am using sagepay) Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 Can you check the request log for any errors? One of two things are happening. A missing PHP extension causing a 500 server error or possibly an error sending the confirmation email. Quote Link to comment Share on other sites More sharing options...
ronniebb Posted April 12 Share Posted April 12 (edited) [<strong>Exception</strong>] /home/******/public_html/*****.uk/cube/classes/PHPMailer/src/PHPMailer.php:1781 - Call to undefined function PHPMailerPHPMailerescapeshellcmd() https://*****.uk/cube/index.php?_g=rm&type=gateway&cmd=process&module=SagePay&cart_order_id=240412-163102-5623&crypt=@f03843343b3dbe1003b75c7c98b13e1da3198372ae95ad97dc4f8c63e4823c666b1ed1bf9b16ca3b0eb4b8b4ae67e428817e7f42332cbcae323dc878bb441463e420c9 so i'm guessing there is a php mailer error, how do I fix it? Edited April 12 by ronniebb Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 It's funny. This is the first time I've ever seen this error. It's failing on the function escapeshellcmd() It's a hosting compatibility issues. Can you ask your hosting company? Quote Link to comment Share on other sites More sharing options...
ronniebb Posted April 12 Share Posted April 12 what do I ask them exactly ? - sorry - I'm not knowledgable here .... Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 Show them that error message. Then they will point the finger straight back as us no doubt which is typical. An undefined function normally points to missing PHP libraries. Quote Link to comment Share on other sites More sharing options...
ronniebb Posted April 12 Share Posted April 12 ok, i'll see what they say many thanks webhost Upon reviewing your concern, I would like to inform you that, for security reasons, the PHP mail function and the escapeshellcmd() have been disabled on all of our shared servers. ??? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 You can go to the store settings then the advanced tab and try a different method to send email e.g. SMTP Quote Link to comment Share on other sites More sharing options...
ronniebb Posted April 12 Share Posted April 12 ok, i'll try that thanks Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 A lot of hosts block out going SMTP connections. Just FYI. You can check with them. Quote Link to comment Share on other sites More sharing options...
ronniebb Posted April 12 Share Posted April 12 you are a hero! - Thanks works perfectly under SMTP! 1 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12 Share Posted April 12 Great!! 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.