Page 1 of 1

Keep Session on Payment

Posted: Thu Nov 20, 2025 10:14 am
by PiLLaO
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

Re: Keep Session on Payment

Posted: Thu Nov 20, 2025 3:45 pm
by BrockleyJohn
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.

Re: Keep Session on Payment

Posted: Fri Nov 21, 2025 12:05 pm
by PiLLaO
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

Code: Select all

$GLOBALS['Linker']->build('checkout_process.php', [session_name() => session_id()])
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.