p500plus Posted January 11, 2017 Share Posted January 11, 2017 (edited) Hello, im working on a payment module and i have issue with creating order after the payment. Payment service provider redirect user after payment on redirection page but than send a post to notification url (pure backend comunication). Redirect and notification is asynchronous. After processing notification message i know payment result and cart id. Is there any way to create order from backend with only cart id? Or in other words is there a way to access context->cart with specific id from backend? Looking forward to your replies Edited January 11, 2017 by p500plus (see edit history) Link to comment Share on other sites More sharing options...
p500plus Posted January 12, 2017 Author Share Posted January 12, 2017 I have already solved my problem.If someone is interested in solution its something like this: $cart = new Cart($cartId); $customer = new Customer($cart->id_customer); $currency = new Currency($cart->id_currency); $total = (float)$cart->getOrderTotal(true, Cart::BOTH); $this->module->validateOrder($cart->id, $pspStatusId, $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); Link to comment Share on other sites More sharing options...
Jota McCready Posted May 15, 2018 Share Posted May 15, 2018 Is there a way to create the order without delete the cart? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now