Post by stavrosa » Fri Sep 04, 2020 3:30 am

Hi all,

How can i do this? I need this for Analytics tracking. My code works fine except when someone pays via PP standard.
Then I can't get the order_id in success controller. Im pretty sure that somehow its gets back, because it needs to "close" the order.

OC 2.1.0.1 / Journal

Thanks in advance
Last edited by stavrosa on Fri Sep 04, 2020 9:31 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Sep 23, 2015 8:08 pm

Post by ADD Creative » Fri Sep 04, 2020 3:52 am

Two things to check. PayPal does not always automatically return the customer to your site. It doesn't need to as the confirmation is sent in a IPN directly (i.e. not via the customer's browser) to the PayPal standard callback. Some customers will not bother to click the link to return to your site.

Also new web browsers will set a new default of SameSite=Lax for cookies. This means that as the PalPal Standard will probably return with a POST, the session will be lost and you won't have an order_id in the success controller.

The fix for this is here.
https://github.com/opencart/opencart/pull/8072

It will be a bit different for 2.1.0.1.
You will need to change the value at the link below to 1.
https://github.com/opencart/opencart/bl ... rd.tpl#L38

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by stavrosa » Fri Sep 04, 2020 5:24 pm

OMG! Dude you rock!! Thank you

I would never find this and took me almost a day of chasing this thing. thanks a lot.

ADD Creative wrote:
Fri Sep 04, 2020 3:52 am
Two things to check. PayPal does not always automatically return the customer to your site. It doesn't need to as the confirmation is sent in a IPN directly (i.e. not via the customer's browser) to the PayPal standard callback. Some customers will not bother to click the link to return to your site.

Also new web browsers will set a new default of SameSite=Lax for cookies. This means that as the PalPal Standard will probably return with a POST, the session will be lost and you won't have an order_id in the success controller.

The fix for this is here.
https://github.com/opencart/opencart/pull/8072

It will be a bit different for 2.1.0.1.
You will need to change the value at the link below to 1.
https://github.com/opencart/opencart/bl ... rd.tpl#L38

Newbie

Posts

Joined
Wed Sep 23, 2015 8:08 pm

Post by paulfeakins » Fri Sep 04, 2020 7:03 pm

stavrosa wrote:
Fri Sep 04, 2020 5:24 pm
OMG! Dude you rock!! Thank you
So you should add [SOLVED] to the beginning of the post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 10 guests