omise / omise-prestashop

Omise PrestaShop Plugin
https://docs.opn.ooo/prestashop-plugin
MIT License
4 stars 7 forks source link

Add the currencies, IDR, JPY and SGD, to be supported for create Omise charge #23

Closed nimid closed 7 years ago

nimid commented 7 years ago

1. Objective

Add the currencies below to be supported for create Omise charge.

Note: Before change, a currency, Thai baht (THB), is only supported.

Although, this pull request has added a currency, SGD, to be supported in spite of Omise API has not officially supported it but when Omise API has supported a currency, SGD, the development part will not required. It requires the system testing instead.

Related information: Related issue: - Related ticket: -

2. Description of change

3. Quality assurance

Environments:

Details:

Go to back-end

The screenshot below shows the added currencies at the back-end.

screenshot-localhost 1616 2017-02-20 17-54-58

The screenshot below shows the list of currencies at the front-end, after it have been added and enabled.

screenshot-localhost 1616 2017-02-20 17-57-34

There are 5 test cases below.

  1. Successfully checkout with currency, IDR
  2. Successfully checkout with currency, JPY
  3. Successfully checkout with currency, THB (Regression Test)
  4. Fail checkout with unsupported currency
  5. Fail checkout, checkout with supported currency but the public key and secret key has been configured with different national account

Test case 1: Successfully checkout with currency, IDR

The screenshot below shows the checkout with currency, IDR.

checkout_idr

The screenshot below shows the success charge with the currency, IDR, at the Omise dashboard.

indonesian_account

Test case 2: Successfully checkout with currency, JPY

The screenshot below shows the checkout with currency, JPY.

checkout_jpy

The screenshot below shows the success charge with the currency, JPY, at the Omise dashboard.

japanese_account

Test case 3 (Regression Test): Successfully checkout with currency, THB

The screenshot below shows the checkout with currency, THB.

checkout_thb

The screenshot below shows the success charge with the currency, THB, at the Omise dashboard.

thai_account

Test case 4: Fail checkout with unsupported currency

The screenshot below shows the checkout form has been hidden and error message has been displayed.

unsupported_currency

Test case 5: Fail checkout, checkout with supported currency but the public key and secret key has been configured with different national account

The screenshot below shows the error message.

screenshot-localhost 1616 2017-02-20 19-22-42

4. Impact of the change

-

5. Priority of change

Normal

6. Additional notes

To add a new currency

add_new_currency

The screenshot below shows an example of adding a new currency, JPY.

add_new_currency_jpy

The ISO code and Numeric ISO code can be referenced from the Wikipedia page ISO 4217.

The Exchange rate can be skipped. It can be updated by click a button Update currency rates at the Currencies page.

click_update_currency_rates

The screenshot below shows the exchange rates have been updated by relate each other.

automatically_update_exchange_rates

screenshot-localhost 1616 2017-02-20 19-55-44

no_payments

To solve this problem, a new currency must be enabled by follow the method below.

To enable a new currency

If the payment method has been enabled for the currency, the characters -- will be displayed.

screenshot-localhost 1616 2017-02-20 20-05-57