Credit Card payment method's callback function has been implemented long time ago since before Omise provided other offsite payment methods.
However, as the payment feature grows, this function remains untouched, duplicated, and complicated.
This pull request is to simplify the function, combining between Offsite callback and Credit Card callback. Yet, also decouple the duplicated code to make the code simpler to integrate with API Localization feature.
Related information:
Related issue(s): T20306 (internal ticket)
2. Description of change
After listing out 2 callback methods from Credit Card and Offsite payment methods.
There are some part of the code that is sharing the same behaviour, and some that could be merged.
Here is a new structure after merged.
3. Quality assurance
🔧 Environments:
WooCommerce: v3.7.1
WordPress: v5.3.2
PHP version: 7.0.16
Omise plugin version: Omise-WooCommerce 3.11 (optional, in case of submitting a new issue)
✏️ Details:
drafting
4. Impact of the change
Some response messages have been changed, that would impact to the plugin translation.
1. Objective
Credit Card payment method's callback function has been implemented long time ago since before Omise provided other offsite payment methods.
However, as the payment feature grows, this function remains untouched, duplicated, and complicated.
This pull request is to simplify the function, combining between Offsite callback and Credit Card callback. Yet, also decouple the duplicated code to make the code simpler to integrate with API Localization feature.
Related information: Related issue(s): T20306 (internal ticket)
2. Description of change
After listing out 2 callback methods from Credit Card and Offsite payment methods. There are some part of the code that is sharing the same behaviour, and some that could be merged.
Here is a new structure after merged.
3. Quality assurance
🔧 Environments:
✏️ Details:
drafting
4. Impact of the change
Some response messages have been changed, that would impact to the plugin translation.
5. Priority of change
Normal
6. Additional Notes
Nothing for now