Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Standard Return


trier

Recommended Posts


Can someone please put me out of my misery and explain how payments via PayPal Standard reach checkout_success. I am setting up a new 2.3.4BS Edge with the latest PayPal app. The first couple of runs returned to checkout_success. PayPal Standard payments, though successful, are now returning to an empty shopping_cart. Every time I check the scripts I (obviously wrongly) come to the conclusion that an empty shopping_cart is correct:

 

 

PayPal returns to checkout_process -

 

    checkout_process    @ line 46:    $payment_modules = new payment($payment);

 

        function paypal_standard   @ line 75:    $this->pre_before_check();

 

        function pre_before_check  @ line 659:   (may call $this->after_process(); if IPN already actioned)

 

    checkout_process (continues)    @ line 81:   $payment_modules->before_process();

 

        function before_process    @ line 801:   $this->after_process();

 

        function after_process  clears cart, unregister variables, tep_redirect(tep_href_link('checkout_process.php', '', 'SSL'));

 

    checkout_process (restarts)    @ line 22:    if ($cart->count_contents() < 1) { tep_redirect(tep_href_link('shopping_cart.php')); }

 

 

As far as I can see the only route to checkout_success is at the end of checkout_process which (intentionally?) is never reached, to get there another order would be created and email sent?

 

 

Also, to confirm, the order_status_history table is updated with a status OSCOM_APP_PAYPAL_PS_PREPARE_ORDER_STATUS_ID by the return processing and by the IPN process (i.e. 2 entries intentionally). The table is only updated with the OSCOM_APP_PAYPAL_PS_ORDER_STATUS_ID by the return processing (i.e. never by the IPN).

Link to comment
Share on other sites

Hi,

 

the tep_redirect in the after_process-function is wrong.

 

I just checked the line in my paypal_standard.php payment-module:

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

It's, as far as I know, the most recent version: 5.018

 

AD

Link to comment
Share on other sites

@@AngusD

 

Hi, Thank you for your reply. I felt that the last line of function after_process in paypal_standard.php should redirect to checkout_success.

 

I am confused because:

  •     A fresh download of 2.3.4BS Edge has the redirect to checkout_process.php
  •     After installing 2.3.4BS Edge and hitting the PayPal App Update button in admin, no changes were made to paypal_standard.php. The admin>paypal>configure page shows “PayPal App v5.018”
  •     The PayPal App add-on, 9184, is v5.010. In this, paypal_standard.php redirects to checkout_success.php but it has some code which is not in the 2.3.4 script and it doesn’t have the hard-coded file/table names.
  •     Last November I asked -
        “The last line in function after_process()
             is                 tep_redirect(tep_href_link('checkout_process.php', '', 'SSL'));
            should it be  tep_redirect(tep_href_link('checkout_success.php', '', 'SSL'));  ?”
 
 

    and got the reply -

            “tep_redirect(tep_href_link('checkout_process.php', '', 'SSL'));

            is correct”

 

 I don’t know if I’ve gone wrong somewhere because I’m surprised that no-one else appears to have had the problem?

 

Link to comment
Share on other sites

@@Mikepo

 

Hi, The auto-return address in my PayPal account and the return address in the process_button() parameter are both checkout_process.php.

 

Unless I have made a major mistake somewhere, I can only assume that the return in the after_process() function in 2.3.4BS Edge paypal_standard.php is wrongly showing paypal_process, it should be paypal_success, also, paypal_standard.php is not updated by the PayPal App Auto Update??

 

Link to comment
Share on other sites

@@trier Maybe they confused the return_URL with the after_process() redirect URL?

 

You're right. I downloaded the responsive master and the paypal_standard.php has the wrong redirect URL.

Edit: Is that even an issue? When you install the PayPal-Module, you're being notified of an update and the paypal_standard.php will be replaced by the correct file.

 

I've made some changes in my paypal_standard.php (5.0.18) and then "updated" again. All changes I made were gone after the update.

Are you sure you're looking at the right file? Not a cached version or an old version on your system?

 

AD

Link to comment
Share on other sites

@@AngusD

 

Hi, You were headed in the right direction, the reason for my confusion woke me at 4a.m. -

 

I installed a fresh 2.3.4BS & and updated the PayPal App. Confusion arose because although the site admin showed the app version v5.018, running a file compare of the site pre & post update showed no differences.

 

Unfortunately, (you may be ahead of me already) the site compare was run on my PC scripts but I hadn’t downloaded after the update! At some point after the update I'd uploaded paypal_standard.php again (can't remember why).

 

Thank you for your time & help with this.

 

Link to comment
Share on other sites

  • 11 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...