Hi,
Before 1.0, the user was redirected to payment just after clicking 'continue' on the final order confirmation page. In the 1.0, the thank you page is displayed before, and the user has to click pay to be redirected to its payment method.
How can I find the old behaviour ? Which state_machine.yml is the correct one to amend, and with which transition ?
Thanks !
I achieved this by modifying the thankYouAction of the OrderController. I added the following
if (null !== $payment && $order->getTotal() > 0 && $order->getPaymentState() != OrderPaymentStates::STATE_PAID && $payment->getMethod()->getGateway() === 'paypal_express_checkout') {
return $this->redirectToRoute('sylius_shop_order_pay', ['orderId' => $orderId]);
}
You could remove the check for paypal and add your own payment gateway, or just remove that part altogether
-- Some edits for the new 1.0 version code
Nice ! I was hoping that it could be done in configuration only, with the state machine, no ? @pjedrzejewski ?
Closing now since the new behaviour si close to what I need
Most helpful comment
I achieved this by modifying the thankYouAction of the OrderController. I added the following
You could remove the check for paypal and add your own payment gateway, or just remove that part altogether
-- Some edits for the new 1.0 version code