Post by C4Y » Sun Jul 08, 2018 7:10 pm

Hi,
I don't find solution for this problem :

I'm activing PayPal module ((Powered by Braintree) on Opncart 3.0.2.0 )

When the cusommer buy an article, and click on "passed command", the page "checkout" is bloked.
On debug, we can read this :

Image
Image
Image
Image

Thanks for some idea and help

C4Y
Newbie

Posts

Joined
Sun Jul 08, 2018 7:00 pm

Post by straightlight » Mon Jul 09, 2018 10:48 pm

What are the Braintree logs showing when enabling the debug mode? You can send the report over PM if you'd like. I just helped a forum user about Braintree as we speak with the same OC version and no issue as such was encountered so far.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by C4Y » Mon Jul 09, 2018 11:46 pm

Hello,

Thank you for your answers.

I have two errors :
PHP Unknown: Function create_function() is deprecated in /var/www/storage/vendor/braintree/braintree_php/lib/Braintree/Util.php on line 205
PHP Unknown: Function create_function() is deprecated in /var/www/storage/vendor/braintree/braintree_php/lib/Braintree/Util.php on line 172

My server uses Apache 2.4 http2 and php 7.2

Thank you for help

C4Y
Newbie

Posts

Joined
Sun Jul 08, 2018 7:00 pm

Post by straightlight » Tue Jul 10, 2018 12:10 am

Finally, real true clues!

Due to the PHP requirements of OC for v7.1 and above, I think it is important to also focus on these issues reported above in accordance to: https://stackoverflow.com/questions/481 ... deprecated.

In vendor/braintree/braintree_php/lib/Braintree/Util.php file, find:

Code: Select all

$callback = create_function('$matches', 'return strtoupper($matches[1]);');
replace with:

Code: Select all

$callback = function($matches) use ($callback) {
							return $callback . strtoupper($matches[1]);
						}
Then, find:

Code: Select all

$callbacks[$delimiter] = create_function('$matches', "return '$delimiter' . strtolower(\$matches[1]);");
replace with:

Code: Select all

$callbacks[$delimiter] = function($matches) use ($delimiter) {
					return $delimiter . strtolower($matches[1]);
				}
Then, not to forget these steps: viewtopic.php?f=176&p=728050#p725084

This should clarify the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Tue Jul 10, 2018 12:25 am

Another clue found in vendor/braintree/braintree_php/tests/integration/Error/ValidationErrorCollectionTest.php file,

find:

Code: Select all

$codes = array_map(create_function('$validationError', 'return $validationError->code;'), $validationErrors);
replace with:

Code: Select all

$codes = array_map(function($matches) use ($validationError) { return $validationError->code; }, $validationErrors);
Re-use the same link from my previous post to refresh the changes.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by C4Y » Tue Jul 10, 2018 3:53 am

Thank you, finally I preferred downgrade in PHP7.0

So, my problem is in the code that is in the table oc_theme :
Image

How to regenerate this code?

Thanks

C4Y
Newbie

Posts

Joined
Sun Jul 08, 2018 7:00 pm

Post by straightlight » Tue Jul 10, 2018 3:58 am

This row has been generated by an extension not originating from the core.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by C4Y » Tue Jul 10, 2018 6:01 am

deleting lines in oc theme and it works :D

Tanks for help and good jobs all ;)

C4Y
Newbie

Posts

Joined
Sun Jul 08, 2018 7:00 pm

Post by letsdoit » Mon Oct 15, 2018 3:23 am

Hi Guys,
I have also had the same issue with the PayPal (Powered by Braintree) Module in Opencart 3.0.2.0 running PHP v7.2. As my hosts provide either PHP 5.6 or 7.2, In the end I had to reinstall OC completely on PHP 5.6 and then the PayPal (Powered by Braintee) module worked fine!
Is there a simple fix for this? My hosts have recently stopped supporting PHP 5.3, so I assume 5.6 won't be far behind and then I have the problem all over again! Any ideas would be appreciated?

Newbie

Posts

Joined
Wed Oct 03, 2018 8:36 pm
Who is online

Users browsing this forum: No registered users and 2 guests