-
-
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
Add Validation to chose payment method #12665
Add Validation to chose payment method #12665
Conversation
AdamKasp
commented
May 24, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
License | MIT |
f6f0a1d
to
9a3ddef
Compare
src/Sylius/Bundle/ApiBundle/Resources/config/validation/ChoosePaymentMethod.xml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibility.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Resources/translations/validators.en.yaml
Outdated
Show resolved
Hide resolved
.../Bundle/ApiBundle/spec/Validator/Constraints/ChosenPaymentMethodEligibilityValidatorSpec.php
Outdated
Show resolved
Hide resolved
features/checkout/paying_for_order/preventing_not_available_payment_method_selection.feature
Show resolved
Hide resolved
@AdamKasp rebase needed 💃 |
fe4181b
to
948bcfc
Compare
src/Sylius/Bundle/ApiBundle/Resources/translations/validators.en.yaml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php
Outdated
Show resolved
Hide resolved
948bcfc
to
544177d
Compare
src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibility.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Validator/Constraints/ChosenPaymentMethodEligibilityValidator.php
Outdated
Show resolved
Hide resolved
3a88705
to
7a99432
Compare
7a99432
to
2678c2c
Compare
|
||
Assert::false(array_search($paymentMethodName, array_column($paymentMethods, 'name'), true)); | ||
Assert::true( | ||
$this->responseChecker->hasViolationWithMessage($this->ordersClient->getLastResponse(), |
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.
$this->responseChecker->hasViolationWithMessage($this->ordersClient->getLastResponse(), | |
$this->responseChecker->hasViolationWithMessage( | |
$this->ordersClient->getLastResponse(), |
Well I might be wrong with this comment, but when checked some other ... hasViolationWithMessage...
steps they are like this 😃
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.
for me both options are fine, but it fit in a single line so I decided to left it in one line :)
Thanks, Adam! 🥇 |