Changeset 3691008
- Timestamp:
- 09/11/2026 07:49:04 AM (2 months ago)
- Location:
- wc-ozow-gateway
- Files:
-
- 12 edited
- 1 copied
-
tags/1.3.7 (copied) (copied from wc-ozow-gateway/trunk )
-
tags/1.3.7/build/index-asset.php (modified) (1 diff)
-
tags/1.3.7/changelog.txt (modified) (1 diff)
-
tags/1.3.7/classes/class-wc-gateway-ozow.php (modified) (5 diffs)
-
tags/1.3.7/includes/ozowpay-wc-gateway-resend-payment-link-function.php (modified) (2 diffs)
-
tags/1.3.7/readme.txt (modified) (2 diffs)
-
tags/1.3.7/woocommerce-gateway-ozow.php (modified) (2 diffs)
-
trunk/build/index-asset.php (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/classes/class-wc-gateway-ozow.php (modified) (5 diffs)
-
trunk/includes/ozowpay-wc-gateway-resend-payment-link-function.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce-gateway-ozow.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-ozow-gateway/tags/1.3.7/build/index-asset.php
r3547557 r3691008 8 8 return array( 9 9 'dependencies' => array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n' ), 10 'version' => '1.3. 6',10 'version' => '1.3.7', 11 11 ); -
wc-ozow-gateway/tags/1.3.7/changelog.txt
r3547486 r3691008 51 51 * Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0. 52 52 * Dev – Performed regression testing to ensure stable payment functionality. 53 54 = 1.3.7 - 2026-09-09 = 55 * Added – Support for international billing and shipping addresses. 56 * Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses. 57 * Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country. 58 * Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency. 59 * Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules. 60 * Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged. -
wc-ozow-gateway/tags/1.3.7/classes/class-wc-gateway-ozow.php
r3547486 r3691008 143 143 144 144 // Setup available countries. 145 $this->available_countries = array( 'ZA');145 $this->available_countries = array(); 146 146 147 147 // Setup available currency codes. 148 $this->available_currencies = array( 'ZAR');148 $this->available_currencies = array(); 149 149 $this->init_settings(); 150 150 $this->ozowpay_init_form_fields(); … … 175 175 176 176 /** 177 * Comparing woocommerce current currency with ZAR 177 * Check whether the store is configured for South Africa and ZAR. 178 * 179 * @return bool 178 180 */ 179 181 private function ozowpay_is_valid_for_use() { 180 return get_woocommerce_currency() === 'ZAR'; 182 $store_country = strtoupper( (string) WC()->countries->get_base_country() ); 183 $store_currency = strtoupper( (string) get_woocommerce_currency() ); 184 185 return 'ZA' === $store_country && 'ZAR' === $store_currency; 186 } 187 188 /** 189 * Ensure the gateway uses the merchant's configured country/currency only. 190 * 191 * @return bool 192 */ 193 public function is_valid_for_use() { 194 return $this->ozowpay_is_valid_for_use(); 181 195 } 182 196 … … 248 262 <?php 249 263 } else { 250 echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports ZAR as a currency.', 'wc-ozow-gateway' ) . '</strong></p></div>';264 echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports stores in South Africa using ZAR.', 'wc-ozow-gateway' ) . '</strong></p></div>'; 251 265 } 252 266 } … … 262 276 $order_total = $order->get_total(); 263 277 $currency_code = get_woocommerce_currency(); 264 $country_code = $order->billing_country;278 $country_code = WC()->countries->get_base_country(); 265 279 $site_code = $this->site_code; 266 280 $order_key = $order->order_key; 267 281 $private_key = $this->private_key; 268 $plugin_version = 'Plugin-V1.3. 6';282 $plugin_version = 'Plugin-V1.3.7'; 269 283 $wordpress_version = 'WP-' . $this->ozowpay_get_wordepress_version(); 270 284 $php_version = 'PHP-' . phpversion(); … … 278 292 $args = array( 279 293 'SiteCode' => $site_code, 280 'CountryCode' => empty( $country_code ) ? 'ZA' :$country_code,294 'CountryCode' => $country_code, 281 295 'CurrencyCode' => $currency_code, 282 296 'Amount' => $amount, -
wc-ozow-gateway/tags/1.3.7/includes/ozowpay-wc-gateway-resend-payment-link-function.php
r3547486 r3691008 140 140 $private_key = $payment_gateway->get_private_key(); 141 141 $api_key = $payment_gateway->get_api_key(); 142 $country_code = $order->get_billing_country();143 $currency_code = $order->get_currency();142 $country_code = WC()->countries->get_base_country(); 143 $currency_code = get_woocommerce_currency(); 144 144 $amount = $order->get_total(); 145 145 $order_id = $order->get_id(); 146 146 $order_key = $order->get_order_key(); 147 $optional_5 = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3. 6WC-' . WC_VERSION;147 $optional_5 = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.7 WC-' . WC_VERSION; 148 148 $customer_first_name = $order->get_billing_first_name(); 149 149 $customer_last_name = $order->get_billing_last_name(); … … 160 160 $request_args = array( 161 161 'SiteCode' => $site_code, 162 'CountryCode' => empty( $country_code ) ? 'ZA' :$country_code,162 'CountryCode' => $country_code, 163 163 'CurrencyCode' => $currency_code, 164 164 'Amount' => $amount, -
wc-ozow-gateway/tags/1.3.7/readme.txt
r3547486 r3691008 3 3 Tags: woocommerce, payment request, online refund 4 4 Requires at least: 6.6 5 Tested up to: 6.9.45 Tested up to: 7.1 6 6 Requires PHP: 7.4 or later 7 Stable tag: 1.3. 67 Stable tag: 1.3.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 118 118 * Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0. 119 119 * Dev – Performed regression testing to ensure stable payment functionality. 120 121 = 1.3.7 - 2026-09-09 = 122 * Added – Support for international billing and shipping addresses. 123 * Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses. 124 * Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country. 125 * Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency. 126 * Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules. 127 * Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged. -
wc-ozow-gateway/tags/1.3.7/woocommerce-gateway-ozow.php
r3547486 r3691008 11 11 * License: GPLv3 12 12 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 13 * Version: 1.3. 613 * Version: 1.3.7 14 14 * Requires at least: 6.6 15 * Tested up to: 6.9.416 * WC tested up to: 1 0.7.017 * WC requires at least: 7.215 * Tested up to: 7.1 16 * WC tested up to: 11.1.0 17 * WC requires at least: 9.8.0 18 18 * Requires PHP: 7.4 or later 19 19 * @package Ozow Gateway for WooCommerce … … 24 24 } 25 25 26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3. 6' ); // WRCS: DEFINED_VERSION.26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3.7' ); // WRCS: DEFINED_VERSION. 27 27 define( 'WC_GATEWAY_OZOW_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) ); 28 28 define( 'WC_GATEWAY_OZOW_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); -
wc-ozow-gateway/trunk/build/index-asset.php
r3547557 r3691008 8 8 return array( 9 9 'dependencies' => array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n' ), 10 'version' => '1.3. 6',10 'version' => '1.3.7', 11 11 ); -
wc-ozow-gateway/trunk/changelog.txt
r3547486 r3691008 51 51 * Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0. 52 52 * Dev – Performed regression testing to ensure stable payment functionality. 53 54 = 1.3.7 - 2026-09-09 = 55 * Added – Support for international billing and shipping addresses. 56 * Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses. 57 * Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country. 58 * Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency. 59 * Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules. 60 * Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged. -
wc-ozow-gateway/trunk/classes/class-wc-gateway-ozow.php
r3547486 r3691008 143 143 144 144 // Setup available countries. 145 $this->available_countries = array( 'ZA');145 $this->available_countries = array(); 146 146 147 147 // Setup available currency codes. 148 $this->available_currencies = array( 'ZAR');148 $this->available_currencies = array(); 149 149 $this->init_settings(); 150 150 $this->ozowpay_init_form_fields(); … … 175 175 176 176 /** 177 * Comparing woocommerce current currency with ZAR 177 * Check whether the store is configured for South Africa and ZAR. 178 * 179 * @return bool 178 180 */ 179 181 private function ozowpay_is_valid_for_use() { 180 return get_woocommerce_currency() === 'ZAR'; 182 $store_country = strtoupper( (string) WC()->countries->get_base_country() ); 183 $store_currency = strtoupper( (string) get_woocommerce_currency() ); 184 185 return 'ZA' === $store_country && 'ZAR' === $store_currency; 186 } 187 188 /** 189 * Ensure the gateway uses the merchant's configured country/currency only. 190 * 191 * @return bool 192 */ 193 public function is_valid_for_use() { 194 return $this->ozowpay_is_valid_for_use(); 181 195 } 182 196 … … 248 262 <?php 249 263 } else { 250 echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports ZAR as a currency.', 'wc-ozow-gateway' ) . '</strong></p></div>';264 echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports stores in South Africa using ZAR.', 'wc-ozow-gateway' ) . '</strong></p></div>'; 251 265 } 252 266 } … … 262 276 $order_total = $order->get_total(); 263 277 $currency_code = get_woocommerce_currency(); 264 $country_code = $order->billing_country;278 $country_code = WC()->countries->get_base_country(); 265 279 $site_code = $this->site_code; 266 280 $order_key = $order->order_key; 267 281 $private_key = $this->private_key; 268 $plugin_version = 'Plugin-V1.3. 6';282 $plugin_version = 'Plugin-V1.3.7'; 269 283 $wordpress_version = 'WP-' . $this->ozowpay_get_wordepress_version(); 270 284 $php_version = 'PHP-' . phpversion(); … … 278 292 $args = array( 279 293 'SiteCode' => $site_code, 280 'CountryCode' => empty( $country_code ) ? 'ZA' :$country_code,294 'CountryCode' => $country_code, 281 295 'CurrencyCode' => $currency_code, 282 296 'Amount' => $amount, -
wc-ozow-gateway/trunk/includes/ozowpay-wc-gateway-resend-payment-link-function.php
r3547486 r3691008 140 140 $private_key = $payment_gateway->get_private_key(); 141 141 $api_key = $payment_gateway->get_api_key(); 142 $country_code = $order->get_billing_country();143 $currency_code = $order->get_currency();142 $country_code = WC()->countries->get_base_country(); 143 $currency_code = get_woocommerce_currency(); 144 144 $amount = $order->get_total(); 145 145 $order_id = $order->get_id(); 146 146 $order_key = $order->get_order_key(); 147 $optional_5 = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3. 6WC-' . WC_VERSION;147 $optional_5 = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.7 WC-' . WC_VERSION; 148 148 $customer_first_name = $order->get_billing_first_name(); 149 149 $customer_last_name = $order->get_billing_last_name(); … … 160 160 $request_args = array( 161 161 'SiteCode' => $site_code, 162 'CountryCode' => empty( $country_code ) ? 'ZA' :$country_code,162 'CountryCode' => $country_code, 163 163 'CurrencyCode' => $currency_code, 164 164 'Amount' => $amount, -
wc-ozow-gateway/trunk/readme.txt
r3547486 r3691008 3 3 Tags: woocommerce, payment request, online refund 4 4 Requires at least: 6.6 5 Tested up to: 6.9.45 Tested up to: 7.1 6 6 Requires PHP: 7.4 or later 7 Stable tag: 1.3. 67 Stable tag: 1.3.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 118 118 * Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0. 119 119 * Dev – Performed regression testing to ensure stable payment functionality. 120 121 = 1.3.7 - 2026-09-09 = 122 * Added – Support for international billing and shipping addresses. 123 * Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses. 124 * Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country. 125 * Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency. 126 * Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules. 127 * Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged. -
wc-ozow-gateway/trunk/woocommerce-gateway-ozow.php
r3547486 r3691008 11 11 * License: GPLv3 12 12 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 13 * Version: 1.3. 613 * Version: 1.3.7 14 14 * Requires at least: 6.6 15 * Tested up to: 6.9.416 * WC tested up to: 1 0.7.017 * WC requires at least: 7.215 * Tested up to: 7.1 16 * WC tested up to: 11.1.0 17 * WC requires at least: 9.8.0 18 18 * Requires PHP: 7.4 or later 19 19 * @package Ozow Gateway for WooCommerce … … 24 24 } 25 25 26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3. 6' ); // WRCS: DEFINED_VERSION.26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3.7' ); // WRCS: DEFINED_VERSION. 27 27 define( 'WC_GATEWAY_OZOW_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) ); 28 28 define( 'WC_GATEWAY_OZOW_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
Note:
See TracChangeset
for help on using the changeset viewer.