-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Api] Change payment method after checkout #11924
Conversation
AdamKasp
commented
Oct 13, 2020
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Related tickets | part of #11250 |
License | MIT |
a4c9cc1
to
962873c
Compare
features/checkout/paying_for_order/changing_payment_method_after_order_confirmation.feature
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Resources/config/api_resources/Payment.xml
Outdated
Show resolved
Hide resolved
d9e52ef
to
f068817
Compare
src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
Outdated
Show resolved
Hide resolved
5aa9537
to
27954f2
Compare
1cc46ea
to
fd976cc
Compare
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/ChoosePaymentMethodHandler.php
Outdated
Show resolved
Hide resolved
13d9996
to
3951feb
Compare
3951feb
to
e802597
Compare
...s/checkout/paying_for_order/changing_offline_payment_method_after_order_confirmation.feature
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutOrderDetailsContext.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutThankYouContext.php
Outdated
Show resolved
Hide resolved
): void { | ||
if ($user instanceof ShopUserInterface && $operationName === 'shop_select_payment_method') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest refactoring the existing code to apply on query builder
->andWhere(sprintf('%s.state = :state', $rootAlias))
->setParameter('state', OrderInterface::STATE_CART)
only if there is an endpoint for checkout.
IMO it could simplify the logic 😃
e802597
to
8c4568b
Compare
8c4568b
to
33eeea3
Compare
996f49b
to
0be4481
Compare
* @When I change payment method to :paymentMethodName after checkout | ||
* @When I change payment method to :paymentMethodName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that these two steps are not necessary anymore
* @When I change payment method to :paymentMethodName after checkout | |
* @When I change payment method to :paymentMethodName |
Thank you, Adam! 🥇 |