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

[Api] Change payment method after checkout #11924

Merged
merged 5 commits into from
Oct 21, 2020

Conversation

AdamKasp
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Related tickets part of #11250
License MIT

@AdamKasp AdamKasp requested a review from a team as a code owner October 13, 2020 13:11
@AdamKasp AdamKasp changed the title Api change payment method [Api] Change payment method after checkout Oct 13, 2020
@GSadee GSadee added the API APIs related issues and PRs. label Oct 14, 2020
@AdamKasp AdamKasp force-pushed the api-change-payment-method branch 2 times, most recently from d9e52ef to f068817 Compare October 14, 2020 18:30
@AdamKasp AdamKasp force-pushed the api-change-payment-method branch 3 times, most recently from 5aa9537 to 27954f2 Compare October 15, 2020 11:44
@AdamKasp AdamKasp force-pushed the api-change-payment-method branch 2 times, most recently from 1cc46ea to fd976cc Compare October 16, 2020 08:58
): void {
if ($user instanceof ShopUserInterface && $operationName === 'shop_select_payment_method') {
Copy link
Member

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 😃

Comment on lines +54 to +55
* @When I change payment method to :paymentMethodName after checkout
* @When I change payment method to :paymentMethodName
Copy link
Member

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

Suggested change
* @When I change payment method to :paymentMethodName after checkout
* @When I change payment method to :paymentMethodName

@GSadee GSadee merged commit 48d4f50 into Sylius:master Oct 21, 2020
@GSadee
Copy link
Member

GSadee commented Oct 21, 2020

Thank you, Adam! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants