Related information:
Related issue(s): π
Related ticket(s): T2244, T2245
2. Description of change
Be able to create charge with new supported currencies "IDR" and "SGD" currencies.
Format the display of transaction amount at the plugin dashboard page.
Modify a warning message that informed about unsupported currency at administrator side.
Note:
The currency THB and JPY have been already supported.
3. Quality assurance
π§ Environments:
Platform version: OpenCart 2.0.3.1.
Omise plugin version: Omise-OpenCart 2.0.0.1
PHP versions: 5.6.28 and 7.0.15
βοΈ Details:
β 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).
β 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.
β 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
β At the plugin dashboard page, JPY currency should display an amount as 30,133ε instead of Β₯30,133.
β At the plugin dashboard page, IDR currency should display an amount as Rp54,000.
β Test create transfer with IDR currency
6.1. This test was made with amount 6002.45 and 6001 (second row)
β 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.
4. Impact of the change
Nothing.
5. Priority of change
Normal.
6. Additional Notes
SGD currency is currently not supported from Omise API. This pull request just for prepare the plugin to be ready for coming feature.
The screenshot below shows the tested success checkouts for currencies, IDR, JPY and THB and fail checkout for unsupported currency USD on OpenCart 2.0.3.1.
The first row (Order ID 8) is a success order for JPY.
The second row (Order ID 7) is a success order for IDR.
The third row (Order ID 6) is a success order for THB.
The fourth row (Order ID 4) is a fail order for unsupported currency USD.
1. Objective
To make plugin support the following currencies.
Related information: Related issue(s): π Related ticket(s): T2244, T2245
2. Description of change
Be able to create charge with new supported currencies "IDR" and "SGD" currencies.
Format the display of transaction amount at the plugin dashboard page.
Modify a warning message that informed about unsupported currency at administrator side.
Note: The currency THB and JPY have been already supported.
3. Quality assurance
π§ Environments:
βοΈ Details:
β 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, chooseLocal
tab and update currency toIDR
1.3. Do normal checkout process. 1.4. Check a result from Omise log, at request parameters,currency
must beIDR
and amount must be subunit (i.e. set product price to15,025
, the amount that send to Omise must be1502500
).β 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, chooseLocal
tab and update currency toSGD
2.3. Do normal checkout process. 2.4. Check a result from Omise log, at request parameters,currency
must beSGD
and amount must be subunit (i.e. set product price to15,025
, the amount that send to Omise must be1502500
).β 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 fromOmise Indo account
)β At the plugin dashboard page, JPY currency should display an amount as
30,133ε
instead ofΒ₯30,133
.β At the plugin dashboard page, IDR currency should display an amount as
Rp54,000
.β Test create transfer with IDR currency 6.1. This test was made with amount
6002.45
and6001
(second row)β At the plugin dashboard page, SGD currency should display an amount as
S$54,000
.4. Impact of the change
Nothing.
5. Priority of change
Normal.
6. Additional Notes
SGD currency is currently not supported from Omise API. This pull request just for prepare the plugin to be ready for coming feature.
The screenshot below shows the tested success checkouts for currencies, IDR, JPY and THB and fail checkout for unsupported currency USD on OpenCart 2.0.3.1.