omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

[ENGA3-421]: Billing address details are removed from the POST data when creating card token. #304

Closed aashishgurung closed 2 years ago

aashishgurung commented 2 years ago

1. Objective

Billing address details were added to create a card token in omise-payment-form-handler.js because Visa backend requires billing address (Reference: #269). It has been removed because this caused issue on some merchants because some sell digital products so they won't have billing address. Some merchants customize the checkout page so the billing address may not have the same IDs we were expecting. This caused issue of undefiend error.

Even though we fix the undefined error to meaningful error, it will still cause issue as they won't have the billing address or a customize billing address fields.

Jira Ticket: #421

2. Description of change

Billing address details have been removed from the POST data when creating card token in omise-payment-form-handler.js.

3. Quality assurance

Checkout without filling billing address. You should see default Woocommerce error instead of undefined error.

🔧 Environments:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
33.3% 33.3% Duplication