omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

How to make plugin support USD #77

Closed gtheripper closed 6 years ago

gtheripper commented 7 years ago

At product price page i want it to show the real price of USD like 20$ but if i proceed check out it will send the price divide by 100

guzzilar commented 7 years ago

@gtheripper Currently Omise-WooCommerce hasn't supported for USD currency yet. However, you might take a look at this line: https://github.com/omise/omise-woocommerce/blob/master/includes/gateway/class-omise-payment.php#L40

That $currency_subunits property will be used at https://github.com/omise/omise-woocommerce/blob/master/includes/gateway/class-omise-payment.php#L131 to convert amount to subunit format when create a new charge. You may make a change by adding 'USD' => 100 to multiply 100 back.

guzzilar commented 6 years ago

@gtheripper Hi, USD currency has been supported at release v3.2 (PR #84). With this feature, you will be able to show USD currency at your storefront and make charge with USD currency as well.

You can download it right away either from this repository or https://wordpress.org/plugins/woocommerce

Note, this currency can be used only with Omise Thailand-registered account. Ref: https://www.omise.co/currency-and-amount.

Cheers!