Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    application error Understanding checkout flow regarding paypal, checkout_process.php and before_process

    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.
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Understanding checkout flow regarding paypal, checkout_process.php and before_pro

    Quote Originally Posted by s_p_ike View Post
    whenever there's a paypal payment the checkout flow is not the regular one
    Correct. That's because the PayPal IPN (Website Payments Standard) module does not record the payment as part of the customer's session.
    Instead, PayPal initiates that by sending the IPN to the store's ipn_main_handler.php file ... which then validates the payment notice, does some security checks, and then saves the order and sends the emails. It does not trigger the usual checkout_process notifiers as part of that process.

    You can avoid all the limitations of storing orders with the IPN technology by turning OFF the Website Payments Standard(IPN) module, and using Express Checkout instead -- Express Checkout will fire all the usual notifiers and is way more reliable in the way it saves order data because it doesn't have to rely on a separate background notification process to generate orders.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 8
    Last Post: 17 Jul 2012, 04:39 AM
  2. Payment module stuck at checkout_process & before_process function?
    By Kyle_Coventry in forum Addon Payment Modules
    Replies: 14
    Last Post: 25 Aug 2011, 10:51 AM
  3. Having problem with order.php and checkout_process.php with OLD Zen Cart v1.2.3
    By wolfbane01 in forum Managing Customers and Orders
    Replies: 0
    Last Post: 28 Jul 2010, 01:56 AM
  4. Replies: 3
    Last Post: 10 Apr 2009, 10:37 PM
  5. Question regarding customizing the check out flow...
    By Echelon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Oct 2008, 05:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR