Post by jessicana » Wed Aug 04, 2021 11:25 am

I have several issues that I will try to combine in this post because they relate to the same extensions.

I get the below error:

Code: Select all

Warning: Trying to access array offset on value of type bool in /var/www/domain.com/html/directory/products/catalog/model/extension/payment/pp_braintree.php on line 147
Warning: Trying to access array offset on value of type bool in /var/www/domain.com/html/directory/products/catalog/model/extension/payment/pp_braintree.php on line 147
Warning: Trying to access array offset on value of type bool in /var/www/domain.com/html/directory/products/catalog/model/extension/payment/pp_express.php on line 6
Warning: Trying to access array offset on value of type bool in /var/www/domain.com/html/directory/products/catalog/model/extension/payment/pp_express.php on line 6
Does this have to do anything with the PHP version I am using? I am using PHP 8, shall I use 7.4 instead of 8 to make sure all extensions are compatible?

I noticed that the below happens when I use login with Amazon and I try to checkout with Paypal. I use the same email ID for both Amazon pay and Paypal (sandbox):

Code: Select all

SyntaxError: Unexpected token < in JSON at position 0 <b>Warning </b>: Trying to access array offset on value of type null in <b>/var/www/domain.com/html/directory/products/ catalog/controller/extension/payment/amazon_login_pay.php</b> on line <b>975</b><b>Warning</b>: Trying to access array offset on value of type null in <b>/var/www/domain.com/html/ directory/products/catalog/controller/extension/payment/ amazon_login_pay.php</b> on line <b>975</b><b>Warning</b>: Trying to access arrat offset on value of type null in
Under order status in Braintree payments, I had to change the default settings in the extension to the below-revised settings so that customers can see the downloadable products under their account once they checkout. The default settings required a manual change from processing to complete in order for customers to see their download.

Authorization Expired > Expired
Authorized > Complete
Authorizing > Pending
Settlement Pending > Processing
Failed > Failed
Gateway Rejected > Denied
Processor Declined > Denied
Settled > Complete
Settling > Complete
Submitted For Settlement > Complete
Voided > Voided

Is this correct, or do I have to stick to the default settings?

Lastly, what is the difference between the PayPal Commerce Platform and the Paypal Braintree extension?

Newbie

Posts

Joined
Mon Jul 26, 2021 3:14 am

Post by ADD Creative » Wed Aug 04, 2021 4:42 pm

It would be helpful to post your OpenCart version. PHP 8 is a bit stricter in some ways and will likely generate warnings for some code that was fine in PHP 7 or 5. If you want to stop the warnings filling up your log, you would need to make some changes to the code or lower the PHP version.

Your second issue is that you have display errors on, which makes your fist issue worse. Not only will this cause problems like the one you are seeing, it is also a security risk. You need to ensure display errors is switched off in three places.
In the settings.
In system/config/default.php.
In you PHP configuration. Should be off by default, but there are some bad server configurations out there. Use phpinfo() to check.

You don't have to use the default settings. You just need to understand what each status means and set them appropriately.

The two payment modules are for two different payment gateways. They just happen to be from PayPal.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Wed Aug 04, 2021 7:52 pm

OpenCart 2.x versions most likely won't work with PHP 8, use PHP 7.4 or 7.3. Or upgrade to the latest OpenCart 3.0.3.7.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by jessicana » Wed Aug 04, 2021 11:48 pm

I use a fresh install - the most recent Opencart version 3.0.3.7 and I only use the extensions pre-installed with the theme. I use it on LEMP stack.

I tried PayPal Express Checkout and it works perfectly. What I like about the Braintree extension is that customers see it under/above Amazon pay (i.e., outside the checkout form) and they are alert upfront when the item is in their cart that they can checkout through Paypal OR Amazon pay. But I think both extensions are conflicting on the most recent version of opencart and on PHP 8. I prefer to use PHP8.

The only problem with PayPal Express Checkout is that customers have to go all the way down in the checkout process to see the Paypal button and to see that they can pay with Paypal. I prefer Amazon pay method in showing it to the customer outside the checkout forms. Seeing it is a call for faster checkout!

Newbie

Posts

Joined
Mon Jul 26, 2021 3:14 am
Who is online

Users browsing this forum: No registered users and 23 guests