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: adding Ebanx fields and validation to tef #24240

Merged
merged 4 commits into from
Apr 23, 2018

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Apr 17, 2018

Using #23830 as a base, we're adding Ebanx fields to the TEF (bank transfer) payment panel.

Most of the work entailed plugging in some sort of consistent validation, and depends on #24294 being deployed.

For a background see: pxLjZ-4BN-p2

screen shot 2018-04-19 at 5 28 58 pm

Notes

Validation for the fields, though extensible, is very basic. Aside from checking the tax number, there is no type, length or other validity checks on the data happening on the frontend.

For now, I've build inline validation only for tef to at least keep this page consistent.

Testing

  1. Apply D11441-code, change your currency to BRL, and hardcode 'BR' as the property of byCountry
  2. Add a new plan to your cart and head to checkout
  3. Select TEF - Transferência bancária
  4. Submit empty form
  5. Submit form with valid values

Expectations

At 3:
You should see the name, bank and all the Ebanx field values

At 4:
Inline clientside validation errors should show

At 5:
The following data object will be sent (among other data) in the POST data:

"payment": {
"name": "...",
"tef-bank": "...",
"document": "...",
"street-number": "...",
"address-1": "...",
"address-2": "...",
"state": "...",
"city": "...",
"phone-number": "...",
"postal-code": "...",
...,
}

@ramonjd ramonjd added [Status] In Progress [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. labels Apr 17, 2018
@ramonjd ramonjd self-assigned this Apr 17, 2018
@matticbot
Copy link
Contributor

@ramonjd ramonjd requested a review from a team April 17, 2018 07:24
@ramonjd ramonjd force-pushed the add/ebanx-fields-and-validation-tef branch from 3d44ac3 to 18b940f Compare April 19, 2018 06:40
@ramonjd ramonjd force-pushed the add/ebanx-fields-and-validation-tef branch from 18b940f to 1095d78 Compare April 19, 2018 06:53
@ramonjd
Copy link
Member Author

ramonjd commented Apr 19, 2018

es lint errors in CI will be addressed by #24308

@ramonjd ramonjd force-pushed the add/ebanx-fields-and-validation-tef branch from bf9d339 to 9e41cfc Compare April 20, 2018 02:34
@ramonjd ramonjd force-pushed the add/ebanx-fields-and-validation-tef branch from 9e41cfc to 631a20d Compare April 20, 2018 02:37
@ramonjd ramonjd requested a review from yoavf April 20, 2018 06:34
@ramonjd ramonjd changed the title [WIP] Checkout: adding Ebanx fields and validation to tef Checkout: adding Ebanx fields and validation to tef Apr 20, 2018
@yoavf yoavf force-pushed the add/ebanx-tef branch 3 times, most recently from 0693110 to 1d8a0bd Compare April 22, 2018 10:00
@yoavf yoavf force-pushed the add/ebanx-fields-and-validation-tef branch from 683f81d to 5c32e09 Compare April 22, 2018 10:03
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.

With the exception of the code from #24294, this LGTM and works as expected. Thanks!

…'BR' ]`

Adding validation - still WIP

Toying with further ebanx abstraction ( remove this commit after updating ebanx fields )
Added snapshot test for select box
@ramonjd ramonjd force-pushed the add/ebanx-fields-and-validation-tef branch from 5763363 to f83aa1d Compare April 23, 2018 04:23
@ramonjd ramonjd merged commit 1b376a4 into add/ebanx-tef Apr 23, 2018
@ramonjd ramonjd deleted the add/ebanx-fields-and-validation-tef branch April 23, 2018 04:33
yoavf pushed a commit that referenced this pull request Apr 25, 2018
* initial commit

* initial commit to be squashed, and revert `paymentMethods.byCountry[ 'BR' ]`

Adding validation - still WIP

Toying with further ebanx abstraction ( remove this commit after updating ebanx fields )

* Updated tests for TEF/Ebanx

* Updated tests for redirect payment box
Added snapshot test for select box
yoavf pushed a commit that referenced this pull request May 14, 2018
* initial commit

* initial commit to be squashed, and revert `paymentMethods.byCountry[ 'BR' ]`

Adding validation - still WIP

Toying with further ebanx abstraction ( remove this commit after updating ebanx fields )

* Updated tests for TEF/Ebanx

* Updated tests for redirect payment box
Added snapshot test for select box
ramonjd added a commit that referenced this pull request May 15, 2018
* initial commit

* initial commit to be squashed, and revert `paymentMethods.byCountry[ 'BR' ]`

Adding validation - still WIP

Toying with further ebanx abstraction ( remove this commit after updating ebanx fields )

* Updated tests for TEF/Ebanx

* Updated tests for redirect payment box
Added snapshot test for select box
ramonjd pushed a commit that referenced this pull request May 15, 2018
wip: add tef

Checkout: adding Ebanx fields and validation to tef (#24240)

* initial commit

* initial commit to be squashed, and revert `paymentMethods.byCountry[ 'BR' ]`

Adding validation - still WIP

Toying with further ebanx abstraction ( remove this commit after updating ebanx fields )

* Updated tests for TEF/Ebanx

* Updated tests for redirect payment box
Added snapshot test for select box

Checkout: add masking to redirect ebanx fields (#24517)

* Initial commit
Relocated masking rules to use in all checkout-related forms
Added and updated test suites

* Masking values for redirect payment form

rename tef to brazil-tef for clarity
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants