After payment (redirect to the payment page), the cart is not cleared
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
After payment (redirect to the payment page), the cart is not cleared
Hello!
After payment (redirect to the payment page), the cart is not cleared.
The order is created in the system, but the basket is not cleared.
This is a part of my method "process" in my provider:
What could be the problem? Thanks!
After payment (redirect to the payment page), the cart is not cleared.
The order is created in the system, but the basket is not cleared.
This is a part of my method "process" in my provider:
Code: Select all
if (isset($response->status) && $response->status === CheckoutStatus::Created) {
$order->setPaymentStatus(\Aimeos\MShop\Order\Item\Base::PAY_PENDING);
$this->saveOrder($order);
if (isset($response->links)) {
$link = collect($response->links)->filter(function ($item) {
return isset($item->rel) && $item->rel === 'approve';
})->first();
if (!$link || !isset($link->href)) {
return back();
}
return new \Aimeos\MShop\Common\Helper\Form\Standard($link->href, 'GET');
}
}
Re: After payment (redirect to the payment page), the cart is not cleared
The basket is cleared using this code:
https://github.com/aimeos/ai-client-htm ... #L333-L337
If you have a custom implementation, you need to use it to clear the basket afterwards.
https://github.com/aimeos/ai-client-htm ... #L333-L337
If you have a custom implementation, you need to use it to clear the basket afterwards.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: After payment (redirect to the payment page), the cart is not cleared
Thanks, aimeos!
The issue was resolved like this:
After payment, the bank gateway should redirect the customer to the successful checkout page(url). I didn't have this page(url).
I provided the payment gateway this address (https://mysuperpuperaimeostestshop/shop ... y_pay_type) to go after successful payment.
Now the basket is cleared after payment.
The issue was resolved like this:
After payment, the bank gateway should redirect the customer to the successful checkout page(url). I didn't have this page(url).
I provided the payment gateway this address (https://mysuperpuperaimeostestshop/shop ... y_pay_type) to go after successful payment.
Now the basket is cleared after payment.