Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment from cart page fails, if "Skip shipping step if only one shipping method is available" is activated for channel #218

Open
HVStechnik opened this issue Oct 16, 2021 · 0 comments

Comments

@HVStechnik
Copy link

I tried to setup Paypal Commerce Checkout.
It works well as a payment method in the checkout process. If the user clicks on the Paypal button on the payment page in the checkout process and proceeds with the payment via Paypal, the shipping and order confimation page is skipped and the user gets directly to the "thank you" page.

However, the direct Paypal payment button on the card page did not work. I figured out that calling "process-pay-pal-order" failed with the following error:

Uncaught PHP Exception SM\SMException: "Transition "select_shipping" cannot be applied on state "shipping_skipped" of object "App\Entity\Order\Order" with graph "sylius_order_checkout"" at /vendor/winzou/state-machine/src/SM/StateMachine/StateMachine.php line 112 {"exception":"[object] (SM\\SMException(code: 0): Transition \"select_shipping\" cannot be applied on state \"shipping_skipped\" of object \"App\\Entity\\Order\\Order\" with graph \"sylius_order_checkout\" at vendor/winzou/state-machine/src/SM/StateMachine/StateMachine.php:112)"}

The error occurs, if for the channel "Skip shipping step if only one shipping method is available" is activated. Once I deactivate the option in the channel config, the Paypal button on the cart page brings the user to the "checkout/complete" page, on which the order has to be confirmed. That works well. However, I think that the order should be confirmed directly (similar as for the Paypal button on the payment page in the checkout process).

Version: v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant