Changeset 2596495
- Timestamp:
- 09/09/2021 07:38:12 PM (4 years ago)
- Location:
- helcim-commerce-for-woocommerce/trunk
- Files:
-
- 5 edited
-
WCHelcimGateway.php (modified) (5 diffs)
-
classes/HelcimJSService.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
helcim-commerce-for-woocommerce/trunk/WCHelcimGateway.php
r2596407 r2596495 19 19 * @class WCHelcimGateway 20 20 * @extends WC_Payment_Gateway 21 * @version 2.0. 021 * @version 2.0.1 22 22 * @author Helcim Inc. 23 23 */ … … 25 25 { 26 26 private const PLUGIN_NAME = 'woocommerce'; 27 private const VERSION = '2.0. 0';27 private const VERSION = '2.0.1'; 28 28 private const HELCIM_JS_FILE = 'https://secure.myhelcim.com/js/version2.js'; 29 29 private const GOOGLE_RECAPTCHA_URL = 'https://www.google.com/recaptcha/api.js'; … … 291 291 $helcimArgs['server_remote_addr'] = $_SERVER['REMOTE_ADDR'] ?? ''; 292 292 $helcimArgs['amount'] = number_format($order->get_total(), 2, '.', ''); 293 $helcimArgs['currency'] = get_woocommerce_currency();293 $helcimArgs['currency'] = $this->woocommerceCurrencyAbbreviation(); 294 294 $helcimArgs['amountShipping'] = number_format($shippingAmount, 2, '.', ''); 295 295 $helcimArgs['amountTax'] = number_format($order->get_total_tax(), 2, '.', ''); … … 595 595 echo $this->isTest(); ?>"> 596 596 <input type="hidden" id="currency" value="<?php 597 echo get_woocommerce_currency(); ?>">597 echo $this->woocommerceCurrencyAbbreviation(); ?>"> 598 598 <input type="hidden" id="amount" value="<?php 599 599 echo number_format($amountTotal, 2, '.', ''); ?>"> … … 771 771 return $this; 772 772 } 773 774 public function woocommerceCurrencyAbbreviation(): string 775 { 776 return strtoupper((string)preg_replace("/[^a-zA-Z]/", '', get_woocommerce_currency())); 777 } 773 778 } -
helcim-commerce-for-woocommerce/trunk/classes/HelcimJSService.php
r2596407 r2596495 241 241 } 242 242 243 if ((string)$xmlObject->currency !== get_woocommerce_currency()) {243 if ((string)$xmlObject->currency !== $helcimGateway->woocommerceCurrencyAbbreviation()) { 244 244 wc_add_notice('<b>Payment error:</b> Something went wrong please contact the Merchant', 'error'); 245 245 WCHelcimGateway::log( 246 'Helcim JS - Order Currency(' . get_woocommerce_currency(246 'Helcim JS - Order Currency(' . $helcimGateway->woocommerceCurrencyAbbreviation( 247 247 ) . ') Does not match Transaction Currency(' . (string)$xmlObject->currency . ')' 248 248 ); 249 249 $order->add_order_note( 250 'ERROR - Order Currency(' . get_woocommerce_currency(250 'ERROR - Order Currency(' . $helcimGateway->woocommerceCurrencyAbbreviation( 251 251 ) . ') Does not match Transaction Currency(' . (string)$xmlObject->currency . ')' 252 252 ); -
helcim-commerce-for-woocommerce/trunk/index.php
r2596407 r2596495 4 4 Plugin URI: https://www.helcim.com/ 5 5 Description: Helcim Commerce for WooCommerce 6 Version: 2.0. 06 Version: 2.0.1 7 7 Author: Helcim Inc. 8 8 Author URI: https://www.helcim.com/ -
helcim-commerce-for-woocommerce/trunk/readme.txt
r2596407 r2596495 72 72 73 73 == Changelog == 74 75 = 2.0.1 = 76 * Added Refund Capability 77 * Tested upto WordPress 5.8 78 * Tested upto woocommerce v5.6 74 79 75 80 = 2.0.0 = -
helcim-commerce-for-woocommerce/trunk/uninstall.php
r2596407 r2596495 5 5 * Uninstalls Helcim Gateway. 6 6 * 7 * @version 2.0. 07 * @version 2.0.1 8 8 * @author Helcim Inc. 9 9 */
Note: See TracChangeset
for help on using the changeset viewer.