Add the currencies below to be supported for create Omise charge.
Indonesian rupiah (IDR)
Japanese yen (JPY)
Singapore dollar (SGD)
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
Add a function to check whether the current currency is supported.
Modify a function that used to display checkout form, if the current currency is not supported, the system will hide the checkout form and display the error message at the front-end.
3. Quality assurance
Environments:
Platform: PrestaShop 1.6.1.6
Omise plugin: Omise-PrestaShop 1.6.0.0
Omise-PHP: 2.5.0
PHP: 5.6.28
Mozilla Firefox: 51.0
Details:
Go to back-end
Add the supported currencies, IDR, JPY and THB.
Add an unsupported currency, for example United States dollar (USD).
The screenshot below shows the added currencies at the back-end.
The screenshot below shows the list of currencies at the front-end, after it have been added and enabled.
There are 5 test cases below.
Successfully checkout with currency, IDR
Successfully checkout with currency, JPY
Successfully checkout with currency, THB (Regression Test)
Fail checkout with unsupported currency
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
Go to back-end configure Omise module setting for public key and secret key with Omise's Indonesian account.
Go to front-end and checkout with the currency, IDR.
The screenshot below shows the checkout with currency, IDR.
The screenshot below shows the success charge with the currency, IDR, at the Omise dashboard.
Test case 2: Successfully checkout with currency, JPY
Go to back-end configure Omise module setting for public key and secret key with Omise's Japanese account.
Go to front-end and checkout with the currency, JPY.
The screenshot below shows the checkout with currency, JPY.
The screenshot below shows the success charge with the currency, JPY, at the Omise dashboard.
Test case 3 (Regression Test): Successfully checkout with currency, THB
Go to back-end configure Omise module setting for public key and secret key with Omise's Thai account.
Go to front-end and checkout with the currency, THB.
The screenshot below shows the checkout with currency, THB.
The screenshot below shows the success charge with the currency, THB, at the Omise dashboard.
Test case 4: Fail checkout with unsupported currency
Go to front-end and checkout with the currency, USD.
The screenshot below shows the checkout form has been hidden and error message has been displayed.
Test case 5: Fail checkout, checkout with supported currency but the public key and secret key has been configured with different national account
Go to back-end configure Omise module setting for public key and secret key with Omise's Thai account.
Go to front-end but checkout with the DIFFERENT CURRENCY, for example: JPY.
The screenshot below shows the error message.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
To add a new currency
Go to Localization > Currencies, click Add new currency
The screenshot below shows an example of adding a 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.
After saved a new currency, click a button Update currency rates the system will update all exchange rates in the currencies table. From the screenshot below, it has 2 currencies, THB and JPY.
The screenshot below shows the exchange rates have been updated by relate each other.
If go to front-end, there are 2 currencies available.
But if proceed checkout now WITH NEW CURRENCY, JPY, the warning message No payment modules have been installed. will be occurred.
To solve this problem, a new currency must be enabled by follow the method below.
To enable a new currency
Go to Modules and Services > Payment
Go to the section of Currency restrictions
At the Omise column, click checkbox and click Save restrictions
If the payment method has been enabled for the currency, the characters -- will be displayed.
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.
The screenshot below shows the list of currencies at the front-end, after it have been added and enabled.
There are 5 test cases below.
Test case 1: Successfully checkout with currency, IDR
The screenshot below shows the checkout with currency, IDR.
The screenshot below shows the success charge with the currency, IDR, at the Omise dashboard.
Test case 2: Successfully checkout with currency, JPY
The screenshot below shows the checkout with currency, JPY.
The screenshot below shows the success charge with the currency, JPY, at the Omise dashboard.
Test case 3 (Regression Test): Successfully checkout with currency, THB
The screenshot below shows the checkout with currency, THB.
The screenshot below shows the success charge with the currency, THB, at the Omise dashboard.
Test case 4: Fail checkout with unsupported currency
The screenshot below shows the checkout form has been hidden and error message has been displayed.
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.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
To add a new currency
Localization
>Currencies
, clickAdd new currency
The screenshot below shows an example of adding a 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.Update currency rates
the system will update all exchange rates in the currencies table. From the screenshot below, it has 2 currencies, THB and JPY.The screenshot below shows the exchange rates have been updated by relate each other.
No payment modules have been installed.
will be occurred.To solve this problem, a new currency must be enabled by follow the method below.
To enable a new currency
Modules and Services
>Payment
Currency restrictions
Save restrictions
If the payment method has been enabled for the currency, the characters
--
will be displayed.