Hi,
I'm trying to update to v1.1.0.5 an old payment module and need a little help
The module uses checkout_proccess.php, checkout_payment.php and checkout_success.php
For the url notificacion I use this $GLOBALS['Linker']->build('checkout_process.php', [session_name() => session_id()]), but I suppose that is not the correct way to make this, what is the correct way?
And I don't know if is needed to pass the session on url to keep session when user come back from payment website to phoenixcart
If someone can help me, will be apreciated
Best regards
Keep Session on Payment
-
BrockleyJohn
- Certified Developer
- Posts: 173
- Joined: Mon Mar 01, 2021 5:37 pm
- Phoenix Version:
- : Buy Me A Beverage
- Has thanked: 2 times
- Been thanked: 30 times
Re: Keep Session on Payment
The basic structure of the checkout and payment modules hasn't changed so an old payment module should just need to be phoenixified... except for comment handling which is different since they moved to checkout_confirmation.
Sessions are handled for you for the customer's return.
You can use the paypal standard module that's in core as a model for one where the customer leaves the site to pay and then comes back.
Notification urls typically refer to a listener on the site that gets told about changes to the payment status and can act on them - so that the order gets completed after a successful payment even if the customer doesn't return to the store.
The listener should be put under catalog/ext/...
The listener will NOT have access to the customer's session. It needs the id of the order recorded before the customer left which the payment processor should pass to it.
Sessions are handled for you for the customer's return.
You can use the paypal standard module that's in core as a model for one where the customer leaves the site to pay and then comes back.
Notification urls typically refer to a listener on the site that gets told about changes to the payment status and can act on them - so that the order gets completed after a successful payment even if the customer doesn't return to the store.
The listener should be put under catalog/ext/...
The listener will NOT have access to the customer's session. It needs the id of the order recorded before the customer left which the payment processor should pass to it.
-
PiLLaO
- Contributor
- Posts: 107
- Joined: Thu Nov 05, 2020 9:28 pm
- Phoenix Version: v1.1.0.6
- Has thanked: 53 times
- Been thanked: 11 times
Re: Keep Session on Payment
Hi BrockleyJohn,
The problem it's with notify_url, when payment website send payment notification don't have session to send to checkout_process.php to finish the order, so payment it's ok but don't save the order.
The customer session it's ok, but how checkout_process.php knows the order to finish?
The old module sends session to payment website by url, so I use this way
But I don't know if is the correct way or maybe do by other better way.
Looking paypal_standard.php I don't see on notify_url and checkout_process.php to send session
Thanks in advance.
The problem it's with notify_url, when payment website send payment notification don't have session to send to checkout_process.php to finish the order, so payment it's ok but don't save the order.
The customer session it's ok, but how checkout_process.php knows the order to finish?
The old module sends session to payment website by url, so I use this way
Code: Select all
$GLOBALS['Linker']->build('checkout_process.php', [session_name() => session_id()])Looking paypal_standard.php I don't see on notify_url and checkout_process.php to send session
Thanks in advance.