Zen Cart Logo
Forums / PayPal Express Checkout support / Chaning the PayPal Express Checkout return page

Chaning the PayPal Express Checkout return page

Locked

Views: 2,056

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
14 May 2010, 12:47 AM
#1
timryan avatar

timryan

New Zenner

Join Date:
May 2010
Posts:
7
Plugin Contributions:
0

Chaning the PayPal Express Checkout return page

Hi, I was wondering where I can find the code to change the return page for PayPal Express Checkout, so it lands on the checkout_confirmation page, rather than the checkout_payment page.

In the file paypalwpp.php payment module I found this bit of code:

// Set the return URL if they click "Submit" on PayPal site
    $return_url = zen_href_link('ipn_main_handler.php', 'type=ec', 'SSL', true, true, true);
    // Select the return URL if they click "cancel" on PayPal site or click to return without making payment or login
    $cancel_url = zen_href_link(($_SESSION['customer_first_name'] != '' && $_SESSION['customer_id'] != '' ? FILENAME_CHECKOUT_SHIPPING :FILENAME_LOGIN), 'ec_cancel=1', 'SSL');

and I was successfully able to change the cancel_url by changing FILENAME_CHECKOUT_SHIPPING to FILENAME_CHECKOUT_CONFIRMATION

But with the return_url, it appears to be using ipn_main_handler.php. So I checked out that file and could find what could be redirecting to the CHECKOUT_PAYMENT or CHECKOUT_SHIPPING pages. I have tried replacing all instances of these with CHECKOUT_CONFIRMATION, but had no luck.

Could somebody please tell me what bit of code tells PayPal which page to return to?

Using v1.3.8a btw

Thanks in advance!

14 May 2010, 5:56 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Chaning the PayPal Express Checkout return page

You're going about it ALL WRONG.

You CANNOT simply tell it to come back to a different page.

It MUST go through the normal process. Otherwise checkout can't complete.

If your real goal is to bypass the Shipping page and the Payment/Coupon/GV page, then you simply need to configure your Express Checkout module in your admin area, and tell it to "Auto select cheapest shipping" (BEWARE: this will PREVENT your customers from having ANY choice about shipping costs), and to "Skip payment options page" (NOTE: if you have coupons or gift certificates enabled on your site, this setting is ignored; otherwise customers wouldn't have a place to enter such details).
FYI: these options I mention are already checked by default.

The code changes you were attempting to make will simply result in failed transactions and confused customers, and thus no sales.

And, btw, you should be upgrading to v1.3.9.

.
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.