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

Validate payment type #632

Merged
merged 2 commits into from Aug 16, 2016
Merged

Validate payment type #632

merged 2 commits into from Aug 16, 2016

Conversation

gbirke
Copy link
Member

@gbirke gbirke commented Aug 15, 2016

When validating the amount, also check the payment type.

Fixes phab:T142967

@gbirke gbirke changed the title [WIP] Validate payment type Validate payment type Aug 16, 2016
@@ -331,8 +332,7 @@ $( function () {

function paymentDataIsValid() {
var currentState = store.getState();
return currentState.validity.amount ||
( currentState.donationFormContent.amount && currentState.donationFormContent.paymentType ) ;
return currentState.validity.amount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be misleading. It actually is the validity of payment data (including the payment type).

When validating the amount, also check the payment type.
Handle the new distiction between amount and payment type validation on
the client side and display error messages accordingly.

Renamed all instances of "amount validation" with "payment data
validation", including the route. Changed the URL in the template in the CMS wiki.
@KaiNissen KaiNissen merged commit aec530b into master Aug 16, 2016
@KaiNissen KaiNissen deleted the default-payment-type branch August 16, 2016 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants