Jump to content

Opayo (Form)


CubeCart Bot

Recommended Posts

  • 3 months later...

  • 4 years later...

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 by bsmither
Link to comment
Share on other sites

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 !

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 1 year later...

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?

Link to comment
Share on other sites

  • 1 month later...

[<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 by ronniebb
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...