Hello,
v 1.3.8 heavily modified (but the files concerning this question are untouched)
The problem: The notifier NOTIFY_CHECKOUT_PROCESS_HANDLE_AFFILIATES at the end of checkout_process.php is not executed when paypal is the payment method selected (Paypal IPN). That notifier is correctly executed when another payment method is selected, even when is selected a payment method (developed by myself) which rely on an external gateway to process credit cards payment.
So I scanned the paypal.php file (includes/modules/payment/) to understand what was going on and focues my attention on the before_process function, because I saw that if MODULE_PAYMENT_PAYPAL_PDTTOKEN is empty (which is my case), then the cart is resetted and usual session variables related to the order are unset and then there's a redirect to checkout_success.
I understand that this could be the point: whenever there's a paypal payment the checkout flow is not the regular one because when before_process is executed it stops the flow (due to MODULE_PAYMENT_PAYPAL_PDTTOKEN == '') and redirect directly to checkout_success, without executing the code that comes after the call to before_process in checkout_process.php
Is it right?
If so, how are sent the order confirmation mails?
And ... would be right to place the call of the notifier just before the redirection to checkout_success in before_process function of paypal.php?
Thank you for your opinion.
Bookmarks