Hello,
I am trying to finish a payment module. (on Oxid 4.6.5_49955)
When the customer make his payment and click on the link to get back to the shop (on the website of bank), module send an email with informations about order (order references, articles, payment...).
But if customer don't click on this link and close the bank page's, I will never receive this email.
So I am trying to get back informations to send this mail when the bank notify us about the payment (server to server). So I don't got in session all the informations to send the email.
I have only got the order ID to get back all informations.
This is how I get Order, User and Payment references :
It seems to work for Order, User and Payment
But impossible to fill the Basket with Order Articles data.
Do you know if exist an easy way to do this ? (like a magical function getLastUserSession()) ?
Or how to fill the Basket ? :confused:
Thank you :)
I am trying to finish a payment module. (on Oxid 4.6.5_49955)
When the customer make his payment and click on the link to get back to the shop (on the website of bank), module send an email with informations about order (order references, articles, payment...).
But if customer don't click on this link and close the bank page's, I will never receive this email.
So I am trying to get back informations to send this mail when the bank notify us about the payment (server to server). So I don't got in session all the informations to send the email.
I have only got the order ID to get back all informations.
This is how I get Order, User and Payment references :
PHP Code:
// Get order and save status as OK
$oOrder = oxNew('oxorder');
$oOrder->load($_POST['reference']); // Id of Order
$oOrder->oxorder__oxtransstatus = new oxField('OK');
$oOrder->save();
// Loading User
$oUser = oxNew( 'oxuser' );
$oUser->load($oOrder->oxorder__oxuserid->rawValue);
// Loading Payment
$oPayment = oxNew( 'oxpayment' );
$oPayment->load($oOrder->oxorder__oxpaymenttype->rawValue);
// Loading Basket
$oOrderArticles = $oOrder->getOrderArticles();
$oBasket = oxNew( 'oxbasket' );
$oOrder->_addOrderArticlesToBasket($oBasket, $oOrderArticles);
But impossible to fill the Basket with Order Articles data.
Do you know if exist an easy way to do this ? (like a magical function getLastUserSession()) ?
Or how to fill the Basket ? :confused:
Thank you :)