Jump to content
thirty bees forum
  • 0

PayPal guest checkout broken?


Coachonko

Question

On module version 5.5.0 and tb 1.3.0, PHP 7.4

Logged-in customers can checkout fine, guest checkouts always fail, resulting in the message

An error occurred during the payment


Trying to debug the problem, all I can find in the logs is the following 3 notices from PHP-FPM.

[14-Oct-2022 07:34:48 Europe/Rome] PHP Notice:  Undefined index: order_reference in /var/www/domain.com/html/cache/smarty/compile/8c/ef/52/8cef52e10da76c532f10ad5be9c7a51c761cc3ee_0.file.order-confirmation-plus.tpl.php on line 119
[14-Oct-2022 07:34:48 Europe/Rome] PHP Notice:  Trying to get property 'value' of non-object in /var/www/domain.com/html/cache/smarty/compile/8c/ef/52/8cef52e10da76c532f10ad5be9c7a51c761cc3ee_0.file.order-confirmation-plus.tpl.php on line 119
[14-Oct-2022 07:34:51 Europe/Rome] PHP Notice:  Undefined variable: process in /var/www/domain.com/html/modules/paypal/paypal.php on line 935

The last undefined variable error was fixed here.

order_reference is used to create a link for the user to follow the order. The fact that it is undefined makes me think that the order id is not created.

In the backoffice, I can confirm that the guest user is created correctly, with all of the information. To me it is clearly an issue is with the module.

 

This is a serious problem, please help.

Edited by Coachonko
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Neither of these messages are errors. They are merely notices without any impact on processing.

Without an actual error message, nobody can help you.

54 minutes ago, Coachonko said:

To me it is clearly an issue is with the module.

It might be. It might not. 

PayPal module tries to convert cart to an order. To do that it uses standard core functionality - PaymentModule::validateOrder method. This method triggers a lot of hooks that other modules can subscribe to. It's quite likely that some of these modules throws an exception that causes the validation process to fail. For example, there can be some module that synchronize data, sends an email, or whatnot. 

And I'm not even talking about overrides.

Without error message we don't know what is wrong, and we can't even assign blame to a specific module (paypal). I know it's frustrating, but that's the way it is.

Link to comment
Share on other sites

  • 0
8 minutes ago, datakick said:

It might be. It might not. 

PayPal module tries to convert cart to an order. To do that it uses standard core functionality - PaymentModule::validateOrder method. This method triggers a lot of hooks that other modules can subscribe to. It's quite likely that some of these modules throws an exception that causes the validation process to fail. For example, there can be some module that synchronize data, sends an email, or whatnot. 

And I'm not even talking about overrides.

Without error message we don't know what is wrong, and we can't even assign blame to a specific module (paypal). I know it's frustrating, but that's the way it is.

Ok, I am testing this on a clean tb install without any overrides. So you can take those out of the equation.

As for modules, I am also not using any third party modules. Many of the ones that come with a clean install have been disabled too, as an attempt to isolate the problem.

The log directory does not get any update, and the system logs in /var/log/php-fpm only report those notices. I don't know where this error is logged, if it is at all. Can you please help me?

Link to comment
Share on other sites

  • 0
2 hours ago, datakick said:

Try to downgrade paypal module, for example use version 5.4.5 - https://github.com/thirtybees/paypal/releases/tag/5.4.5. If that help, we know that the issue is new injection is 5.5 version.

If that does not help, try updating your store to bleeding edge / 1.4 -- a lot of issues were fixed there. Might help. Might not. 

I have just tested with 5.4.5 and I get the same error.

I should also mention that I am using the one-page checkout, if you'd like to try to reproduce the issue

Upgrading to bleeding-edge / 1.4 is not ideal, as the production environment does have a theme already developed and some overrides (though still no third party modules). But I will attempt the upgrade to fix the paypal module, I need the guest checkouts working.

UPDATE: I have tested bleeding edge and the error happens there too.

To recap: this happens on a clean install of tb, bleeding edge, no overrides, many default modules disabled, niara theme, one page checkout. It also happens on 1.3.0 and with PayPal module version 5.4.5.

UPDATE2: provided screenshot of modules enabled

screencapture-obfuscated.png

  

2 hours ago, datakick said:

PayPal module tries to convert cart to an order.

I believe the module does something to the cart because the cart is gone, but it is not successfully transformed into an order.

Edited by Coachonko
Added screenshot of modules
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...