omise / omise-opencart

Omise OpenCart Plugin
https://docs.opn.ooo/opencart-plugin
MIT License
10 stars 11 forks source link

Support IDR and SGD currencies. #37

Closed guzzilar closed 7 years ago

guzzilar commented 7 years ago

1. Objective

To make plugin support the following currencies.

Related information: Related issue(s): πŸ™… Related ticket(s): T2244, T2245

2. Description of change

Note: The currency THB and JPY have been already supported.

3. Quality assurance

πŸ”§ Environments:

✏️ Details:

  1. βœ… Test checkout with "IDR" currency 1.1. At admin page, locate to System > Settings. Then, edit your store. 1.2. At the store editing page, choose Local tab and update currency to IDR 1.3. Do normal checkout process. 1.4. Check a result from Omise log, at request parameters, currency must be IDR and amount must be subunit (i.e. set product price to 15,025, the amount that send to Omise must be 1502500).

    screen shot 2560-02-17 at 1 50 19 am

    screen shot 2560-02-17 at 1 52 32 am

  2. βœ… Test checkout with "SGD" currency 2.1. At admin page, locate to System > Settings. Then, edit your store. 2.2. At the store editing page, choose Local tab and update currency to SGD 2.3. Do normal checkout process. 2.4. Check a result from Omise log, at request parameters, currency must be SGD and amount must be subunit (i.e. set product price to 15,025, the amount that send to Omise must be 1502500).

    note, SGD currency is currently not supported, this test was made with Omise Japan account. But basically, just test that those parameters were passed to Omise API correctly.

    screen shot 2560-02-17 at 2 04 59 am
  3. βœ… Test if use currency that doesn't match with the merchant account's currency, it must raise an error. (i.e. this test set store currency to USD but use keys from Omise Indo account)

    note, error message came from Omise API

    screen shot 2560-02-17 at 1 46 49 am
  4. βœ… At the plugin dashboard page, JPY currency should display an amount as 30,133円 instead of Β₯30,133. screen shot 2560-02-17 at 2 00 22 am

  5. βœ… At the plugin dashboard page, IDR currency should display an amount as Rp54,000. screen shot 2560-02-17 at 1 15 50 am

    screen shot 2560-02-17 at 1 31 05 am

  6. βœ… Test create transfer with IDR currency 6.1. This test was made with amount 6002.45 and 6001 (second row) screen shot 2560-02-17 at 1 40 40 am

  7. βœ… At the plugin dashboard page, SGD currency should display an amount as S$54,000.

    note, this test I used Omise Indo account to test, but bypass currency (hard-code to SGD instead of use variable) at OmisePluginHelperCurrency::format() to see the result.

    screen shot 2560-02-17 at 1 56 28 am

4. Impact of the change

Nothing.

5. Priority of change

Normal.

6. Additional Notes

screenshot-54 254 157 179-2017-03-22-18-40-39

  1. The first row (Order ID 8) is a success order for JPY.
  2. The second row (Order ID 7) is a success order for IDR.
  3. The third row (Order ID 6) is a success order for THB.
  4. The fourth row (Order ID 4) is a fail order for unsupported currency USD.