Plugin Directory

Changeset 2955296

Timestamp:
08/18/2023 10:22:50 AM (11 months ago)
Author:
snapplify
Message:

Bug Fixing

Location:
snapplify-payment-gateway
Files:
13 added
4 edited

Legend:

Unmodified
Added
Removed
  • snapplify-payment-gateway/trunk/changelog.txt

    r2954327 r2955296  
     1
     2
     3
    142023-08-16 - version 1.0.1
    25* Bug Fixing
  • snapplify-payment-gateway/trunk/includes/class-wc-gateway-snapplify.php

    r2954327 r2955296  
    212212        $billingCurrency = ( null != $_SESSION['scd_target_currency'] ) ? $_SESSION['scd_target_currency'] : $this->store_currency;
    213213        $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        }
    219221        if ($billingCountry == 'KE') {
    220222            $billingCurrency = 'KES';
  • snapplify-payment-gateway/trunk/readme.txt

    r2954332 r2955296  
    55Requires PHP: 7.2
    66Tested up to: 6.3.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949
    5050== Changelog ==
     51
     52
     53
    5154= 1.0.1 =
    5255* Bug Fixing
     56
    5357= 1.0.0 =
    5458* Initial release
  • snapplify-payment-gateway/trunk/snapplify-payment-gateway.php

    r2954327 r2955296  
    1717 * Plugin URI:        https://www.snapplify.com/woo-plugin
    1818 * Description:       Accept payments in WooCommerce using Snapplify Pay.
    19  * Version:           1.0.1
     19 * Version:           1.0.
    2020 * Author:            Snapplify
    2121 * Author URI:        https://snapplify.com
Note: See TracChangeset for help on using the changeset viewer.