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

Checkout: Add postal code field to Ebanx fields #24294

Merged
merged 2 commits into from
Apr 23, 2018

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Apr 18, 2018

This PR addresses an omission in #24095, whereby the abstracted Ebanx component does not contain the required postal code field.

The inevitable result is that reusing the component won't contain all the required Ebanx fields.

There are no changes to design or functionality.

Screenshot

screen shot 2018-04-12 at 4 45 49 pm

Testing

  1. Set your currency to 'BRL'
  2. Add something to your cart and head to checkout
  3. At the payment step, without entering any data, attempt to submit
  4. Select 'Brazil' as your country
  5. Without entering any data, attempt to submit
  6. Fill in credit card information (use a dummy card no#) and Ebanx fields (a valid tax code is 111.444.777-35)

Expectations

At 3: You should see the normal credit card fields (including the post code field)
At 4: You should see the Ebanx extra fields
At 5: The fields should show validation messages
At 6: Valid form data should permit payment attempt

@ramonjd ramonjd added [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. Payment Methods labels Apr 18, 2018
@matticbot
Copy link
Contributor

@ramonjd ramonjd requested a review from yoavf April 18, 2018 10:40
@@ -36,24 +36,27 @@ export class EbanxPaymentFields extends Component {
const errorMessage = this.props.getErrorMessage( fieldName ) || [];
const isError = ! isEmpty( errorMessage );

return PAYMENT_PROCESSOR_EBANX_COUNTRIES[ this.props.countryCode ].fields.indexOf( fieldName ) > -1
return PAYMENT_PROCESSOR_EBANX_COUNTRIES[ this.props.countryCode ].fields.indexOf( fieldName ) >
-1
? React.createElement(
Copy link
Member Author

Choose a reason for hiding this comment

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

These changes are auto-formatting only

@designsimply designsimply added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 18, 2018
@ramonjd ramonjd force-pushed the add/postal-code-field-to-ebanx-fields branch from 2d631c6 to 5a0762d Compare April 19, 2018 04:29
@ramonjd ramonjd force-pushed the add/postal-code-field-to-ebanx-fields branch from b789d75 to 1e1172b Compare April 19, 2018 07:56
@ramonjd
Copy link
Member Author

ramonjd commented Apr 19, 2018

es lint errors in CI will be addressed by #24308

…straction

Updated validation and tests

Updated styles for abstracted ebanx to ensure that fields look the same in redirect and credit card boxes
Copy link
Contributor

@yoavf yoavf left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@yoavf yoavf added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 22, 2018
@ramonjd ramonjd merged commit ca2c973 into master Apr 23, 2018
@ramonjd ramonjd deleted the add/postal-code-field-to-ebanx-fields branch April 23, 2018 04:33
@dechov
Copy link
Contributor

dechov commented Apr 25, 2018

@ramonjd Due to:

...there appears to be some extra padding in the credit card list item:
extra-padding-in-credit-card-list-item

Is it intended for a specific scope, or can it be removed? (Haven't tested this PR, but can't tell what it's for from the screenshot.)

@ramonjd
Copy link
Member Author

ramonjd commented Apr 26, 2018

@dechov
My mistake - I was trying to remove top padding from another credit card UI view. Thanks very much for picking up on this!

I've created a new PR #24487 to fix it. Would you might checking to see if I've fixed it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Checkout The checkout screen and process for purchases made on WordPress.com. Payment Methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants