Changeset 2955296
- Timestamp:
- 08/18/2023 10:22:50 AM (11 months ago)
- Location:
- snapplify-payment-gateway
- Files:
-
- 13 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
snapplify-payment-gateway/trunk/changelog.txt
r2954327 r2955296 1 2 3 1 4 2023-08-16 - version 1.0.1 2 5 * Bug Fixing -
snapplify-payment-gateway/trunk/includes/class-wc-gateway-snapplify.php
r2954327 r2955296 212 212 $billingCurrency = ( null != $_SESSION['scd_target_currency'] ) ? $_SESSION['scd_target_currency'] : $this->store_currency; 213 213 $billingCountry = ( null != $order->get_billing_country() ) ? $order->get_billing_country() : $this->store_location; 214 $originalAmount = (int) $order->get_total(); 215 $USDToZAR = (int) ( null != $_SESSION['scd_rates'][$this->store_currency] ) ? $_SESSION['scd_rates'][$this->store_currency] : $this->default_currency_value; 216 $USDToCurrency = (int) ( null != $_SESSION['scd_rates'][$billingCurrency] ) ? $_SESSION['scd_rates'][$billingCurrency] : $this->default_currency_value; 217 $amountInUSD = round( ( $originalAmount / $USDToZAR ), 2 ); 218 $amountInOrderCurrency = round( ( $amountInUSD * $USDToCurrency ), 2 ); 214 $amountInOrderCurrency = $originalAmount = $order->get_total(); 215 if ($billingCountry != 'ZA') { 216 $USDToZAR = (null != $_SESSION['scd_rates'][$this->store_currency]) ? $_SESSION['scd_rates'][$this->store_currency] : $this->default_currency_value; 217 $USDToCurrency = (null != $_SESSION['scd_rates'][$billingCurrency]) ? $_SESSION['scd_rates'][$billingCurrency] : $this->default_currency_value; 218 $amountInUSD = round(($originalAmount / $USDToZAR), 2); 219 $amountInOrderCurrency = round(($amountInUSD * $USDToCurrency), 2); 220 } 219 221 if ($billingCountry == 'KE') { 220 222 $billingCurrency = 'KES'; -
snapplify-payment-gateway/trunk/readme.txt
r2954332 r2955296 5 5 Requires PHP: 7.2 6 6 Tested up to: 6.3.0 7 Stable tag: 1.0. 17 Stable tag: 1.0. 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 50 50 == Changelog == 51 52 53 51 54 = 1.0.1 = 52 55 * Bug Fixing 56 53 57 = 1.0.0 = 54 58 * Initial release -
snapplify-payment-gateway/trunk/snapplify-payment-gateway.php
r2954327 r2955296 17 17 * Plugin URI: https://www.snapplify.com/woo-plugin 18 18 * Description: Accept payments in WooCommerce using Snapplify Pay. 19 * Version: 1.0. 119 * Version: 1.0. 20 20 * Author: Snapplify 21 21 * Author URI: https://snapplify.com
Note: See TracChangeset
for help on using the changeset viewer.