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

Auto formatting card numbers in input field on checkout page and My account page. #200

Merged
merged 3 commits into from
Dec 2, 2020

Conversation

mayurkathale
Copy link
Contributor

@mayurkathale mayurkathale commented Dec 1, 2020

1. Objective

This PR auto-formats the input number in card field at checkout field.

For example:
if user inputs,
411111 which converts to 4111 11
4111111111 which converts to 4111 1111 11
4111111111111 which converts to 4111 1111 1111 1

This changes has done in 'Save Card' section in My account page and Checkout page.

Save Card page:
Screen Shot 2020-12-01 at 13 44 25

Checkout page:
Screen Shot 2020-12-01 at 13 45 31

Related information:
Related issue(s): https://omise.atlassian.net/browse/FES-211

2. Description of change

  1. Updated Javascript files which reformats to input value of input field which also takes of spaces from input values before sending to omise api. modified files are assets/javascripts/omise-myaccount-card-handler.js , assets/javascripts/omise-payment-form-handler.js

  2. Added javascript on the form template : templates/payment/form-creditcard.php

3. Quality assurance

🔧 Environments:
i.e.

  • WooCommerce: v4.3.0
  • WordPress: v5.4.2
  • PHP version: 7.3.3
  • Omise plugin version: Omise-WooCommerce 4.3 (optional, in case of submitting a new issue)

✏️ Details:

Steps for testing:

  1. Checkout using card payment.
  2. Order should place successfully and Omise charge should get created in dashboard.
  3. Go to My account > Omise setting > Save Card.
  4. Input card number.
  5. Card should get saved successfully.

4. Impact of the change

Card payment method should work normally.

5. Priority of change

Normal

6. Additional Notes

NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants