Hi,
I'm making a module for SagePay Server as Opencart doesn't have this as a payment option.
So far it's all ok, but in my callback script, I'm trying to access a session variable for the order which I believe should be in $this->session->data['order_id']
My error log is showing this as an undefined variable, and when I've tried to display this using print_r($this->session->data) it is indeed missing.
This is a problem because I need to update the order status when SagePay's servers run my callback script to say the payment has been successful.
I assumed that as this was a session variable it shouldn't be cleared (unless I specifically coded something to do that, which I haven't done). Can anyone advise on this? It's stopping me getting this module working
just some help that was posted on sagepay forum https://support.sagepay.com/forum/Topic10228-29-1.aspx
hows this mod going?
hows this mod going?
I've got it working, but I'm still not sure why it needs to be done in the way described above.
I'm sending over the order ID as part of my callback URL:
$data['NotificationURL'] = html_entity_decode($this->url->https('payment/sagepay_direct/notification&order_id=' . $this->session->data['order_id']));
$this->session->data['order_id'] is available in the send() function of the controller, but in the notification() function it isn't. Both functions are run on the same server from the same controller file, so why is one session variable available in one function and not the other? I'd expect it to be the same in both, which is why I posted the original message because it's not something I can understand.
I'm sending over the order ID as part of my callback URL:
$data['NotificationURL'] = html_entity_decode($this->url->https('payment/sagepay_direct/notification&order_id=' . $this->session->data['order_id']));
$this->session->data['order_id'] is available in the send() function of the controller, but in the notification() function it isn't. Both functions are run on the same server from the same controller file, so why is one session variable available in one function and not the other? I'd expect it to be the same in both, which is why I posted the original message because it's not something I can understand.
Who is online
Users browsing this forum: No registered users and 4 guests