usbswiper / woocommerce-payment-processing-payleap

Process credit cards in a WooCommerce shopping cart using a PayLeap merchant account.
0 stars 1 forks source link

Two bugs related to currency handling #8

Open daigo75 opened 8 years ago

daigo75 commented 8 years ago
  1. In WC_Gateway_USBSwiper_PayLeap::is_available(), the call to get_option( 'woocommerce_currency' ) should be replaced with get_woocommerce_currency(). This will ensure that the currency returned is the one active when the is_available() method is invoked (it may or may not be the same as the base one).
  2. In WC_Gateway_USBSwiper_PayLeap::admin_options(), the currency check should be removed altogether. Checking the currency in the backend doesn't make much sense, because the currency that will be used at the payment (i.e. when the check is actually needed) may different from the one returned in the admin section. For example, shop's base currency could be JPY (not supported), but the actual orders could be placed in USD (supported). Telling the admins that the base currency must be changed before they can configure the gateway is, therefore, incorrect, as the gateway will work just fine.
usbswiper commented 8 years ago

Thanks for the feedback! We'll get these adjustments done and included in the next update.