Changeset 2560395
- Timestamp:
- 07/08/2021 07:21:23 AM (5 years ago)
- Location:
- zipmoney-payments-woocommerce
- Files:
-
- 198 added
- 13 edited
-
tags/2.3.4 (added)
-
tags/2.3.4/LICENSE.txt (added)
-
tags/2.3.4/README.txt (added)
-
tags/2.3.4/assets (added)
-
tags/2.3.4/assets/css (added)
-
tags/2.3.4/assets/css/woocommerce-zipmoney-payment-admin.css (added)
-
tags/2.3.4/assets/css/woocommerce-zipmoney-payment-front.css (added)
-
tags/2.3.4/assets/img (added)
-
tags/2.3.4/assets/img/loader.gif (added)
-
tags/2.3.4/assets/img/loading.gif (added)
-
tags/2.3.4/assets/js (added)
-
tags/2.3.4/assets/js/admin_options.js (added)
-
tags/2.3.4/assets/js/woocommerce-zipmoney-payment-front.js (added)
-
tags/2.3.4/assets/js/zip_order_button.js (added)
-
tags/2.3.4/bin (added)
-
tags/2.3.4/bin/install-wp-tests.sh (added)
-
tags/2.3.4/composer.json (added)
-
tags/2.3.4/includes (added)
-
tags/2.3.4/includes/api (added)
-
tags/2.3.4/includes/api/class-wc-zipmoney-payment-gateway-api-abstract.php (added)
-
tags/2.3.4/includes/api/class-wc-zipmoney-payment-gateway-api-charge.php (added)
-
tags/2.3.4/includes/api/class-wc-zipmoney-payment-gateway-api-checkout.php (added)
-
tags/2.3.4/includes/class-wc-zipmoney-payment-gateway-config.php (added)
-
tags/2.3.4/includes/class-wc-zipmoney-payment-gateway-util.php (added)
-
tags/2.3.4/includes/class-wc-zipmoney-payment-gateway-widget.php (added)
-
tags/2.3.4/includes/class-wc-zipmoney-payment-gateway.php (added)
-
tags/2.3.4/includes/compatibility (added)
-
tags/2.3.4/includes/compatibility/abstract-wc-data-compatibility.php (added)
-
tags/2.3.4/includes/compatibility/class-wc-core-compatibility.php (added)
-
tags/2.3.4/includes/compatibility/class-wc-order-compatibility.php (added)
-
tags/2.3.4/includes/controller (added)
-
tags/2.3.4/includes/controller/class-wc-zipmoney-payment-abstract-controller.php (added)
-
tags/2.3.4/includes/controller/class-wc-zipmoney-payment-charge-controller.php (added)
-
tags/2.3.4/includes/controller/class-wc-zipmoney-payment-checkout-controller.php (added)
-
tags/2.3.4/includes/view (added)
-
tags/2.3.4/includes/view/backend (added)
-
tags/2.3.4/includes/view/backend/admin_options.php (added)
-
tags/2.3.4/includes/view/backend/charge_buttons.php (added)
-
tags/2.3.4/includes/view/frontend (added)
-
tags/2.3.4/includes/view/frontend/checkout_notification_section.php (added)
-
tags/2.3.4/includes/view/frontend/error_page.php (added)
-
tags/2.3.4/includes/view/frontend/express_payment_button.php (added)
-
tags/2.3.4/includes/view/frontend/iframe_redirect.php (added)
-
tags/2.3.4/includes/view/frontend/notification_page.php (added)
-
tags/2.3.4/includes/view/frontend/order_button.php (added)
-
tags/2.3.4/languages (added)
-
tags/2.3.4/languages/default.mo (added)
-
tags/2.3.4/languages/default.po (added)
-
tags/2.3.4/languages/default.pot (added)
-
tags/2.3.4/languages/zippayment-es_MX.mo (added)
-
tags/2.3.4/languages/zippayment-es_MX.po (added)
-
tags/2.3.4/log.txt (added)
-
tags/2.3.4/test.txt (added)
-
tags/2.3.4/tests (added)
-
tags/2.3.4/tests/bootstrap.php (added)
-
tags/2.3.4/tests/test-charge-api.php (added)
-
tags/2.3.4/tests/test-checkout-api.php (added)
-
tags/2.3.4/tests/test-sample.php (added)
-
tags/2.3.4/tests/wc-zipmoney-test-main.php (added)
-
tags/2.3.4/vendor (added)
-
tags/2.3.4/vendor/autoload.php (added)
-
tags/2.3.4/vendor/bin (added)
-
tags/2.3.4/vendor/composer (added)
-
tags/2.3.4/vendor/composer/ClassLoader.php (added)
-
tags/2.3.4/vendor/composer/LICENSE (added)
-
tags/2.3.4/vendor/composer/autoload_classmap.php (added)
-
tags/2.3.4/vendor/composer/autoload_namespaces.php (added)
-
tags/2.3.4/vendor/composer/autoload_psr4.php (added)
-
tags/2.3.4/vendor/composer/autoload_real.php (added)
-
tags/2.3.4/vendor/composer/autoload_static.php (added)
-
tags/2.3.4/vendor/composer/installed.json (added)
-
tags/2.3.4/vendor/zipmoney (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/LICENSE.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/README.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/autoload.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/build (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/build.xml (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/build/shell (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/build/shell/publish.sh (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/composer.json (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/ChargesApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/CheckoutsApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/CustomersApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/RefundsApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/SettlementsApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Api/TokensApi.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Address.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Authority.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CaptureChargeRequest.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Charge.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ChargeCollection.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ChargeOrder.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Checkout.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CheckoutConfiguration.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CheckoutFeatures.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CheckoutFeaturesTokenisation.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CheckoutOrder.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateChargeRequest.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateCheckoutRequest.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateCheckoutRequestFeatures.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateCheckoutRequestFeaturesTokenisation.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateRefundRequest.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/CreateTokenRequest.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Customer.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ErrorResponse.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ErrorResponseError.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ErrorResponseErrorDetails.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Flightadditionaldetails.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/FlightadditionaldetailsPassengers.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/HateoasLinks.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/HateoaslinksLinks.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/InlineResponse200.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Metadata.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/OrderItem.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/OrderItemAdditionalDetails.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/OrderShipping.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/OrderShippingTracking.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Refund.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Settlement.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/SettlementTransactions.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Shopper.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/ShopperStatistics.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/docs/Model/Token.md (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/ChargesApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/CheckoutsApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/CustomersApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/RefundsApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/SettlementsApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Api/TokensApi.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/ApiClient.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/ApiException.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Configuration.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Address.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Authority.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CaptureChargeRequest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Charge.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ChargeCollection.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ChargeOrder.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Checkout.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CheckoutConfiguration.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CheckoutFeatures.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CheckoutFeaturesTokenisation.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CheckoutOrder.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateChargeRequest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateCheckoutRequest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateCheckoutRequestFeatures.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateCheckoutRequestFeaturesTokenisation.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateRefundRequest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CreateTokenRequest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/CurrencyUtil.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Customer.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ErrorResponse.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ErrorResponseError.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ErrorResponseErrorDetails.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Flightadditionaldetails.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/FlightadditionaldetailsPassengers.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/HateoasLinks.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/HateoaslinksLinks.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/InlineResponse200.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Metadata.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/OrderItem.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/OrderItemAdditionalDetails.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/OrderShipping.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/OrderShippingTracking.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Refund.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Settlement.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/SettlementTransactions.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Shopper.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/ShopperStatistics.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/Model/Token.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/lib/ObjectSerializer.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/phpunit.xml.dist (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Api (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Api/ChargesApiTest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Api/CheckoutsApiTest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Api/RefundsApiTest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/ConfigurationTest.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Helper (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Helper/Payload.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/Setup.php (added)
-
tags/2.3.4/vendor/zipmoney/merchantapi-php/test/auth.ini (added)
-
tags/2.3.4/zipmoney-payment-gateway.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/bin (added)
-
trunk/bin/install-wp-tests.sh (added)
-
trunk/includes/api/class-wc-zipmoney-payment-gateway-api-charge.php (modified) (1 diff)
-
trunk/includes/api/class-wc-zipmoney-payment-gateway-api-checkout.php (modified) (1 diff)
-
trunk/includes/class-wc-zipmoney-payment-gateway-config.php (modified) (10 diffs)
-
trunk/includes/class-wc-zipmoney-payment-gateway-widget.php (modified) (3 diffs)
-
trunk/includes/class-wc-zipmoney-payment-gateway.php (modified) (12 diffs)
-
trunk/includes/controller/class-wc-zipmoney-payment-charge-controller.php (modified) (10 diffs)
-
trunk/includes/controller/class-wc-zipmoney-payment-checkout-controller.php (modified) (2 diffs)
-
trunk/includes/view/frontend/express_payment_button.php (modified) (1 diff)
-
trunk/languages (added)
-
trunk/languages/default.mo (added)
-
trunk/languages/default.po (added)
-
trunk/languages/default.pot (added)
-
trunk/languages/zippayment-es_MX.mo (added)
-
trunk/languages/zippayment-es_MX.po (added)
-
trunk/vendor/zipmoney/merchantapi-php/lib/Model/CreateChargeRequest.php (modified) (3 diffs)
-
trunk/vendor/zipmoney/merchantapi-php/lib/Model/CurrencyUtil.php (modified) (3 diffs)
-
trunk/vendor/zipmoney/merchantapi-php/lib/Model/ShopperStatistics.php (modified) (3 diffs)
-
trunk/zipmoney-payment-gateway.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zipmoney-payments-woocommerce/trunk/README.txt
r2481936 r2560395 4 4 Requires at least: WP 4.0 5 5 Tested up to: 5.6 6 Stable tag: 2.3. 36 Stable tag: 2.3.4 7 7 License: GPLv2 or later License http://www.gnu.org/licenses/gpl-2.0.html 8 8 … … 169 169 = 2.3.3 = 170 170 * Removed git related folders and files 171 172 = 2.3.4 = 173 * removed currency validation 174 * added translation for mexico 175 * fixed some widget related issue -
zipmoney-payments-woocommerce/trunk/includes/api/class-wc-zipmoney-payment-gateway-api-charge.php
r2476029 r2560395 346 346 347 347 WC_Zipmoney_Payment_Gateway_Util::log("Create charge exception ". $exception->getCode() . $exception->getMessage(), WC_Zipmoney_Payment_Gateway_Config::LOG_LEVEL_INFO); 348 wc_add_notice(__('Payment error:', ' woothemes') . $exception->getMessage(), 'error');348 wc_add_notice(__('Payment error:', 'zippayment') . $exception->getMessage(), 'error'); 349 349 delete_option($checkout_id); 350 350 } -
zipmoney-payments-woocommerce/trunk/includes/api/class-wc-zipmoney-payment-gateway-api-checkout.php
r2464696 r2560395 33 33 $order = new WC_Order($order_id); 34 34 $WC_Zipmoney_Payment_Gateway_Config = $this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config; 35 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_ bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_IS_IFRAME_FLOW);35 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow(); 36 36 if ($is_iframe_flow){ 37 37 $redirect_url .= "&iframe=1"; -
zipmoney-payments-woocommerce/trunk/includes/class-wc-zipmoney-payment-gateway-config.php
r2464696 r2560395 1 1 <?php 2 3 use zipMoney\Model\CurrencyUtil; 2 4 3 5 class WC_Zipmoney_Payment_Gateway_Config … … 67 69 const REGION_ZA = 'za'; 68 70 const REGION_US = 'us'; 71 const REGION_MX = 'mx'; 69 72 70 73 //Log levels … … 156 159 return array( 157 160 self::CONFIG_ENABLED => array( 158 'title' => __('Active', ' woocommerce'),159 'label' => __('Enable Zip payment', ' woocommerce'),161 'title' => __('Active', 'zippayment'), 162 'label' => __('Enable Zip payment', 'zippayment'), 160 163 'type' => 'checkbox', 161 164 'description' => '', … … 169 172 ),*/ 170 173 self::CONFIG_SANDBOX => array( 171 'title' => __('Environment', ' woocommerce'),172 'label' => __('Enable sandbox mode', ' woocommerce'),174 'title' => __('Environment', 'zippayment'), 175 'label' => __('Enable sandbox mode', 'zippayment'), 173 176 'class' => 'woocommerce_sandbox_enable_option', 174 177 'type' => 'checkbox', 175 'desc_tip' => __('ONLY use sandbox mode in conjunction with sandbox Zip credentials.', ' woocommerce'),178 'desc_tip' => __('ONLY use sandbox mode in conjunction with sandbox Zip credentials.', 'zippayment'), 176 179 'default' => 'no' 177 180 ), 178 181 self::CONFIG_SANDBOX_MERCHANT_PUBLIC_KEY => array( 179 'title' => __('Sandbox public key', ' woocommerce'),182 'title' => __('Sandbox public key', 'zippayment'), 180 183 'type' => 'text', 181 184 'class' => 'woocommerce_toggle_sandbox_field', 182 'desc_tip' => __('Please contact [email protected] to request your Sandbox Public key.', ' woocommerce'),183 'description' => __('Required for Australia only.',' woocommerce'),185 'desc_tip' => __('Please contact [email protected] to request your Sandbox Public key.', 'zippayment'), 186 'description' => __('Required for Australia only.','zippayment'), 184 187 'default' => 'no', 185 188 ), 186 189 self::CONFIG_SANDBOX_MERCHANT_PRIVATE_KEY => array( 187 'title' => __('Sandbox private key', ' woocommerce'),190 'title' => __('Sandbox private key', 'zippayment'), 188 191 'type' => 'text', 189 192 'class' => 'woocommerce_toggle_sandbox_field', 190 'desc_tip' => __('Please contact [email protected] to request your Sandbox API key.', ' woocommerce'),191 'description' => __( 'Please contact [email protected] to request Sandbox API key.', ' woocommerce' ),193 'desc_tip' => __('Please contact [email protected] to request your Sandbox API key.', 'zippayment'), 194 'description' => __( 'Please contact [email protected] to request Sandbox API key.', 'zippayment' ), 192 195 'default' => 'no', 193 196 ), 194 197 self::CONFIG_MERCHANT_PUBLIC_KEY => array( 195 'title' => __('Public key', ' woocommerce'),198 'title' => __('Public key', 'zippayment'), 196 199 'type' => 'text', 197 200 'class' => 'woocommerce_toggle_prod_field', 198 'desc_tip' => __('Please contact [email protected] to request your production public key..', ' woocommerce'),199 'description' => __('Required for Australia only.',' woocommerce'),201 'desc_tip' => __('Please contact [email protected] to request your production public key..', 'zippayment'), 202 'description' => __('Required for Australia only.','zippayment'), 200 203 'default' => '', 201 204 ), 202 205 self::CONFIG_MERCHANT_PRIVATE_KEY => array( 203 'title' => __('Private key', ' woocommerce'),206 'title' => __('Private key', 'zippayment'), 204 207 'type' => 'text', 205 208 'class' => 'woocommerce_toggle_prod_field', 206 'desc_tip' => __('Please contact [email protected] to request your product API key.', ' woocommerce'),207 'description' => __( 'Please contact [email protected] to request your API key.', ' woocommerce' ),209 'desc_tip' => __('Please contact [email protected] to request your product API key.', 'zippayment'), 210 'description' => __( 'Please contact [email protected] to request your API key.', 'zippayment' ), 208 211 'default' => '', 209 212 ), … … 212 215 'type' => 'button', 213 216 'value' => "Check Private key is valid", 214 'description' => __( '', 'woocommerce' ),215 217 'class' => 'check_private_key', 216 218 'desc_tip' => true, 217 219 ), 218 220 self::CONFIG_CHARGE_CAPTURE => array( 219 'title' => __('Capture method', ' woocommerce'),221 'title' => __('Capture method', 'zippayment'), 220 222 'type' => 'select', 221 'desc_tip' => __('Set to "Immediate capture" unless directed by Zip. Immedate capture = automatically capture funds when order approved by Zip. Authorise & capture = initially authorise the funds on the customers account and manually capture at a later time.', ' woocommerce'),223 'desc_tip' => __('Set to "Immediate capture" unless directed by Zip. Immedate capture = automatically capture funds when order approved by Zip. Authorise & capture = initially authorise the funds on the customers account and manually capture at a later time.', 'zippayment'), 222 224 'default' => self::CAPTURE_CHARGE_IMMEDIATELY, 223 225 'options' => array( 224 self::CAPTURE_CHARGE_IMMEDIATELY => 'Immediate capture',225 self::CAPTURE_CHARGE_AUTHORIZED => 'Authorise & capture'226 self::CAPTURE_CHARGE_IMMEDIATELY => __('Immediate capture','zippayment'), 227 self::CAPTURE_CHARGE_AUTHORIZED => __('Authorise & capture','zippayment') 226 228 ) 227 229 ), 228 230 self::CONFIG_LOGGING_LEVEL => array( 229 'title' => __('Log setting', ' woocommerce'),230 'desc_tip' => __('So Zip can assist with troubleshooting any potential issues, we recommend configuring Log Setting to "ALL"', ' woocommerce'),231 'title' => __('Log setting', 'zippayment'), 232 'desc_tip' => __('So Zip can assist with troubleshooting any potential issues, we recommend configuring Log Setting to "ALL"', 'zippayment'), 231 233 'type' => 'select', 232 234 'default' => self::LOG_LEVEL_ALL, 233 235 'options' => array( 234 self::LOG_LEVEL_ALL => 'All messages',235 self::LOG_LEVEL_DEBUG => 'Debug (and above)',236 self::LOG_LEVEL_INFO => 'Info (and above)',237 self::LOG_LEVEL_WARN => 'Warn (and above)',238 self::LOG_LEVEL_ERROR => 'Error (and above)',239 self::LOG_LEVEL_FATAL => 'Fatal (and above)',240 self::LOG_LEVEL_OFF => 'Off (No message will be logged)'236 self::LOG_LEVEL_ALL => __('All messages','zippayment'), 237 self::LOG_LEVEL_DEBUG => __('Debug (and above)','zippayment'), 238 self::LOG_LEVEL_INFO => __('Info (and above)','zippayment'), 239 self::LOG_LEVEL_WARN => __('Warn (and above)','zippayment'), 240 self::LOG_LEVEL_ERROR => __('Error (and above)','zippayment'), 241 self::LOG_LEVEL_FATAL => __('Fatal (and above)','zippayment'), 242 self::LOG_LEVEL_OFF => __('Off (No message will be logged)','zippayment') 241 243 ) 242 244 ), 243 245 self::CONFIG_IS_IFRAME_FLOW => array( 244 'title' => __('In-context checkout', ' woocommerce'),245 'label' => __('Enable in-context checkout flow', ' woocommerce'),246 'type' => 'checkbox', 247 'desc_tip' => __('Enable to offer your customers an iframe checkout experience without being redirected away from your website. ', 'woocommerce'),248 'description' => __(' ', 'woocommerce'),246 'title' => __('In-context checkout', 'zippayment'), 247 'label' => __('Enable in-context checkout flow', 'zippayment'), 248 'type' => 'checkbox', 249 'desc_tip' => __('Enable to offer your customers an iframe checkout experience without being redirected away from your website. But this feature only work for AU region. Other region customer will redirect to zip for payment.', 'zippayment'), 250 'description' => __('Iframe zip checkout only work for AU region. Other region customer will redirect to zip for payment. ', 'zippayment'), 249 251 'default' => 'no' 250 252 ), 251 253 self::CONFIG_ORDER_THRESHOLD_MIN_TOTAL => array( 252 'title' => __('Minimum order value', ' woocommerce'),253 'type' => 'text', 254 'desc_tip' => 'Set the minimum shopping cart value that Zip will be available for use.',254 'title' => __('Minimum order value', 'zippayment'), 255 'type' => 'text', 256 'desc_tip' => __('Set the minimum shopping cart value that Zip will be available for use.',"zippayment"), 255 257 'default' => 1 256 258 ), 257 259 self::CONFIG_ORDER_THRESHOLD_MAX_TOTAL => array( 258 'title' => __('Maximum order value', ' woocommerce'),259 'type' => 'text', 260 'desc_tip' => 'Set the maximum shopping cart value that Zip will be available for use.',260 'title' => __('Maximum order value', 'zippayment'), 261 'type' => 'text', 262 'desc_tip' => __('Set the maximum shopping cart value that Zip will be available for use.','zippayment'), 261 263 'default' => 1500 262 264 ), 263 265 self::CONFIG_SELECT_REGION => array( 264 'title' => __( 'Widget Region', ' woocommerce' ),266 'title' => __( 'Widget Region', 'zippayment' ), 265 267 'type' => 'select', 266 'desc_tip' => __('Select Region to show proper zip widget in product, cart and checkout page', ' woocommerce'),268 'desc_tip' => __('Select Region to show proper zip widget in product, cart and checkout page', 'zippayment'), 267 269 'default' => self::REGION_AU, 268 270 'options' => array( … … 272 274 self::REGION_US => 'United States', 273 275 self::REGION_ZA => 'South Africa', 276 self::REGION_MX => 'Mexico', 274 277 ) 275 278 ), 276 279 self::CONFIG_DISPLAY_WIDGET_MODE => array( 277 'title' => __( 'Display Widget Mode', ' woocommerce' ),280 'title' => __( 'Display Widget Mode', 'zippayment' ), 278 281 'type' => 'select', 279 'desc_tip' => __('Select Display widget mode for Zip widget', ' woocommerce'),282 'desc_tip' => __('Select Display widget mode for Zip widget', 'zippayment'), 280 283 'default' => self::REGION_AU, 281 284 'options' => array( 282 self::DISPLAY_IFRAME => 'iframe',283 self::DISPLAY_INLINE => 'inline',285 self::DISPLAY_IFRAME => __('iframe','zippayment'), 286 self::DISPLAY_INLINE => __('inline','zippayment'), 284 287 ) 285 288 ), 286 289 self::CONFIG_DISPLAY_WIDGET_PRODUCT_PAGE => array( 287 'title' => __('Marketing widgets', ' woocommerce'),288 'label' => __('Display on product page', ' woocommerce'),289 'type' => 'checkbox', 290 'desc_tip' => __('Enable to display the Zip widget below the add to cart button on the product page.', ' woocommerce'),290 'title' => __('Marketing widgets', 'zippayment'), 291 'label' => __('Display on product page', 'zippayment'), 292 'type' => 'checkbox', 293 'desc_tip' => __('Enable to display the Zip widget below the add to cart button on the product page.', 'zippayment'), 291 294 'default' => 'yes' 292 295 ), 293 296 self::CONFIG_DISPLAY_WIDGET_CART => array( 294 'label' => __('Display on cart page', ' woocommerce'),295 'type' => 'checkbox', 296 'desc_tip' => __('Enable to display the Zip widget below the checkout button on the cart page.', ' woocommerce'),297 'label' => __('Display on cart page', 'zippayment'), 298 'type' => 'checkbox', 299 'desc_tip' => __('Enable to display the Zip widget below the checkout button on the cart page.', 'zippayment'), 297 300 'default' => 'yes' 298 301 ), 299 302 self::CONFIG_DISPLAY_TAGLINE_PRODUCT_PAGE => array( 300 'title' => __('Marketing taglines', ' woocommerce'),301 'label' => __('Display on product page', ' woocommerce'),302 'desc_tip' => __('Enable to display the Zip tagline widget below the price on the product page.', ' woocommerce'),303 'title' => __('Marketing taglines', 'zippayment'), 304 'label' => __('Display on product page', 'zippayment'), 305 'desc_tip' => __('Enable to display the Zip tagline widget below the price on the product page.', 'zippayment'), 303 306 'type' => 'checkbox', 304 307 'default' => 'no' 305 308 ), 306 309 self::CONFIG_DISPLAY_TAGLINE_CART => array( 307 'label' => __('Display on cart page', ' woocommerce'),308 'desc_tip' => __('Enable to display the Zip tagline widget below the total price on the cart page.', ' woocommerce'),310 'label' => __('Display on cart page', 'zippayment'), 311 'desc_tip' => __('Enable to display the Zip tagline widget below the total price on the cart page.', 'zippayment'), 309 312 'type' => 'checkbox', 310 313 'default' => 'no' 311 314 ), 312 315 self::CONFIG_DISPLAY_BANNERS => array( 313 'title' => __('Marketing banners', ' woocommerce'),314 'label' => __('Display marketing banners', ' woocommerce'),316 'title' => __('Marketing banners', 'zippayment'), 317 'label' => __('Display marketing banners', 'zippayment'), 315 318 'class' => 'woocommerce_banner_enable', 316 319 'type' => 'checkbox', 317 'desc_tip' => __('Enable to display the Zip strip banners on the pages outlined below.', ' woocommerce'),320 'desc_tip' => __('Enable to display the Zip strip banners on the pages outlined below.', 'zippayment'), 318 321 'default' => 'no' 319 322 ), 320 323 self::CONFIG_DISPLAY_BANNER_SHOP => array( 321 'label' => __('Display on shop', ' woocommerce'),324 'label' => __('Display on shop', 'zippayment'), 322 325 'class' => 'woocommerce_banner_option', 323 326 'type' => 'checkbox', … … 325 328 ), 326 329 self::CONFIG_DISPLAY_BANNER_PRODUCT_PAGE => array( 327 'label' => __('Display on product page', ' woocommerce'),330 'label' => __('Display on product page', 'zippayment'), 328 331 'class' => 'woocommerce_banner_option', 329 332 'type' => 'checkbox', … … 331 334 ), 332 335 self::CONFIG_DISPLAY_BANNER_CATEGORY => array( 333 'label' => __('Display on category cage', ' woocommerce'),336 'label' => __('Display on category cage', 'zippayment'), 334 337 'class' => 'woocommerce_banner_option', 335 338 'type' => 'checkbox', … … 337 340 ), 338 341 self::CONFIG_DISPLAY_BANNER_CART => array( 339 'label' => __('Display on cart', ' woocommerce'),342 'label' => __('Display on cart', 'zippayment'), 340 343 'class' => 'woocommerce_banner_option', 341 344 'type' => 'checkbox', … … 461 464 } 462 465 466 /** 467 * check zip checkout iframe is enabled 468 */ 469 public function is_it_iframe_flow() 470 { 471 $currency = get_option('woocommerce_currency'); 472 if ($currency != CurrencyUtil::CURRENCY_AUD) { 473 return false; //iframe checking is disable until we fix zip checkout js issue to support iframe for all browse 474 } else { 475 return $this->is_bool_config_by_key(self::CONFIG_IS_IFRAME_FLOW); 476 } 477 } 478 463 479 } -
zipmoney-payments-woocommerce/trunk/includes/class-wc-zipmoney-payment-gateway-widget.php
r2464696 r2560395 21 21 22 22 //inject the order button 23 if($WC_Zipmoney_Payment_Gateway_Config->is_ bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_IS_IFRAME_FLOW)){23 if($WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow()){ 24 24 add_filter('woocommerce_order_button_html', array($this, 'order_button'), 10, 2); 25 25 } … … 385 385 $max_limit = $this->WC_Zipmoney_Payment_Gateway->get_option(WC_Zipmoney_Payment_Gateway_Config::CONFIG_ORDER_THRESHOLD_MAX_TOTAL); 386 386 echo '<div data-zm-merchant="'.esc_attr($this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config->get_merchant_public_key()).'" data-env="' . 387 esc_attr($this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config->get_environment()) . '" data-require-checkout="false" data-zm-region="'.$region.'" data-zm-price-max="'.$max_limit.'" data-zm-price-min="'.$min_limit.'" data-zm-display-inline="'.$this->isDisplayInlineWidget().'" ></div> ';387 esc_attr($this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config->get_environment()) . '" data-require-checkout="false" data-zm-region="'.$region.'" data-zm-price-max="'.$max_limit.'" data-zm-price-min="'.$min_limit.'" data-zm-display-inline="'.$this->isDisplayInlineWidget().'" data-zm-language="'.substr(get_locale(), 0, strpos(get_locale(), '_')).'"></div> '; 388 388 } 389 389 … … 426 426 { 427 427 428 $is_iframe_checkout = $this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config->is_ bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_IS_IFRAME_FLOW);428 $is_iframe_checkout = $this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow(); 429 429 430 430 include plugin_dir_path(dirname(__FILE__)) . 'includes/view/frontend/order_button.php'; -
zipmoney-payments-woocommerce/trunk/includes/class-wc-zipmoney-payment-gateway.php
r2481936 r2560395 24 24 public $description = 'Own the way you pay'; 25 25 26 public $version = '2.3. 3';26 public $version = '2.3.4'; 27 27 28 28 public $supports = array('products', 'refunds'); … … 85 85 if ($display) { 86 86 87 echo '<div class="error" style="color: red;"><p><strong> Error:</strong> Zip private key is invalid.</p></div>';87 echo '<div class="error" style="color: red;"><p><strong>'.__("Error:","zippayment").'</strong>'.__(" Zip private key is invalid.","zippayment").'</p></div>'; 88 88 } 89 89 } … … 93 93 94 94 if (is_admin()) { 95 return "Zip - Own it now, pay later";95 return __("Zip - Own it now, pay later","zippayment"); 96 96 } else { 97 return "<span data-zm-widget='inline' data-zm-asset='checkouttitle'> Zip - Own it now, pay later</span>";97 return "<span data-zm-widget='inline' data-zm-asset='checkouttitle'>".__(" Zip - Own it now, pay later ","zippayment")." </span>"; 98 98 } 99 99 } … … 101 101 public function zip_payment_title($title) 102 102 { 103 if (strcmp("<span data-zm-widget='inline' data-zm-asset='checkouttitle'> Zip - Own it now, pay later</span>", $title) == 0)103 if (strcmp("<span data-zm-widget='inline' data-zm-asset='checkouttitle'>".__(" Zip - Own it now, pay later ","zippayment")."</span>", $title) == 0) 104 104 return strip_tags($title); 105 105 … … 229 229 if ($responseCode == '200' && $isAuEndpoint == false) { 230 230 $body = json_decode($response['body']); 231 $message = ucfirst($environment) . ' private key is valid for '. $body->name;231 $message = ucfirst($environment) . __(' private key is valid for ','zippayment') . $body->name; 232 232 $htmlMessage = '<div class="notice notice-success notice-alt is-dismissible zip-notice"><p>' . $message . '</p>'; 233 233 $regions = $body->regions; 234 234 if ($regions) { 235 $regionList = '<p> key is valid for below regions '. ucfirst($environment) . ' environment:<br>';235 $regionList = '<p>'.__('key is valid for below regions ','zippayment') . ucfirst($environment) . ' environment:<br>'; 236 236 $availableRegions = \zipMoney\Model\CurrencyUtil::getAvailableRegions(); 237 237 foreach ($regions as $key => $value) { … … 243 243 } 244 244 if (($responseCode == '404' || $responseCode == '200') && $isAuEndpoint == true) { 245 $message = ucfirst($environment) . " private key valid for Australia region.";245 $message = ucfirst($environment) . __(" private key valid for Australia region.","zippayment"); 246 246 $htmlMessage = '<div class="notice notice-success notice-alt is-dismissible zip-notice"><p>' . $message . '</p></div>'; 247 247 } … … 253 253 if (!is_wp_error($response)) { 254 254 if ($responseCode == '401' || $responseCode == '403' || ($responseCode == '404' && $isAuEndpoint == false)) { 255 $htmlMessage = '<div class="notice notice-error notice-alt is-dismissible zip-notice"><p> Invalid Zip private key. Please check with Zip.</p></div>';255 $htmlMessage = '<div class="notice notice-error notice-alt is-dismissible zip-notice"><p>'.__("Invalid Zip private key. Please check with Zip.","zippayment").'</p></div>'; 256 256 $result = array( 257 257 'error' => true, … … 261 261 } 262 262 } else { 263 $htmlMessage = '<div class="notice notice-error notice-alt is-dismissible zip-notice"><p> Connection error. Please try later.</p></div>';263 $htmlMessage = '<div class="notice notice-error notice-alt is-dismissible zip-notice"><p>'.__("Connection error. Please try later.","zippayment").'</p></div>'; 264 264 $result = array( 265 265 'error' => true, … … 319 319 if (version_compare(phpversion(), '5.3.0', '<')) { 320 320 // PHP Version 321 echo '<div class="error"><p>' . sprintf(__('ZipMoney Error: ZipMoney requires PHP 5.3.0 and above. You are using version %s.', ' woocommerce'), phpversion()) . '</p></div>';321 echo '<div class="error"><p>' . sprintf(__('ZipMoney Error: ZipMoney requires PHP 5.3.0 and above. You are using version %s.', 'zippayment'), phpversion()) . '</p></div>'; 322 322 } elseif (is_checkout() && !is_ssl()) { 323 323 // Show message if enabled and FORCE SSL is disabled and WordPressHTTPS plugin is not detected 324 echo '<div class="error"><p>' . sprintf(__('WARN: ZipMoney is enabled, but the <a href="%s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - ZipMoney will only work in sandbox mode.', ' woocommerce'), admin_url('admin.php?page=wc-settings&tab=checkout')) . '</p></div>';324 echo '<div class="error"><p>' . sprintf(__('WARN: ZipMoney is enabled, but the <a href="%s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - ZipMoney will only work in sandbox mode.', 'zippayment'), admin_url('admin.php?page=wc-settings&tab=checkout')) . '</p></div>'; 325 325 } 326 326 } … … 395 395 WC_Zipmoney_Payment_Gateway_Util::log($exception->getResponseBody()); 396 396 397 wc_add_notice(__('Payment error:', ' woothemes') . $exception->getMessage(), 'error');397 wc_add_notice(__('Payment error:', 'zippayment') . $exception->getMessage(), 'error'); 398 398 399 399 return array( … … 410 410 ); 411 411 } 412 wc_add_notice(__('Payment error: ', ' woothemes') . $response['message'], 'error');412 wc_add_notice(__('Payment error: ', 'zippayment') . $response['message'], 'error'); 413 413 } 414 414 … … 467 467 case 'create': 468 468 $currency = get_option('woocommerce_currency'); 469 if (isset($_GET['iframe']) && $currency != CurrencyUtil::CURRENCY_AUD) { 469 $is_iframe_flow = $this->WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow(); 470 if (isset($_GET['iframe']) && $currency != CurrencyUtil::CURRENCY_AUD && $is_iframe_flow) { 470 471 $checkoutId = $_GET['checkoutId']; 471 472 $state = $_GET['result']; -
zipmoney-payments-woocommerce/trunk/includes/controller/class-wc-zipmoney-payment-charge-controller.php
r2464696 r2560395 21 21 $result['title'] = 'Invalid request'; 22 22 $result['content'] = 'There are some parameters missing in the request url.'; 23 wc_add_notice( 'The payment has been cancelled.', 'error');23 wc_add_notice(__('The payment has been cancelled.','zippayment'), 'error'); 24 24 $result['redirect_url'] = $this->wc_get_checkout_url(); 25 25 return $result; … … 74 74 $result['content'] = $response['message']; 75 75 $result['title'] = 'Error'; 76 wc_add_notice( $response['message'], 'error');76 wc_add_notice(__("An error occurred while processing payment","zippayment"), 'error'); 77 77 } 78 78 } else { … … 80 80 $result['content'] = 'Could not find the order, please try again later.'; 81 81 $result['title'] = 'Error'; 82 wc_add_notice( "Could not find the order, please try again later.", 'error');82 wc_add_notice(__("Could not find the order, please try again later.","zippament"), 'error'); 83 83 } 84 84 break; … … 86 86 $result['title'] = 'The payment is in referred state'; 87 87 $result['content'] = 'Your application is currently under review by zipMoney and will be processed very shortly. You can contact the customer care at [email protected] for any enquiries.'; 88 wc_add_notice( 'Payment pending, your application is currently under review and will be processed shortly.', 'success');88 wc_add_notice(__('Payment pending, your application is currently under review and will be processed shortly.',"zippayment"), 'success'); 89 89 WC()->cart->empty_cart(); 90 90 break; … … 93 93 $result['content'] = 'Your application has been declined by zipMoney. Please contact zipMoney for further information.'; 94 94 $result['redirect_url'] = $this->wc_get_checkout_url(); 95 wc_add_notice( 'Your application has been declined. Please contact Zip Co for further information.', 'error');95 wc_add_notice(__('Your application has been declined. Please contact Zip Co for further information.',"zippayment"), 'error'); 96 96 //remove the wp_option 97 97 delete_option($checkoutId); … … 100 100 $result['title'] = 'The checkout has been cancelled'; 101 101 $result['content'] = 'The checkout has been cancelled.'; 102 wc_add_notice( 'The payment has been cancelled.', 'error');102 wc_add_notice(__('The payment has been cancelled.',"zippayment"), 'error'); 103 103 $result['redirect_url'] = $this->wc_get_checkout_url(); 104 104 //remove the wp_option … … 110 110 $result['content'] = $ex->getMessage(); 111 111 $result['title'] = 'Error'; 112 wc_add_notice( $ex->getMessage(), 'error');112 wc_add_notice(__("An error occurred while processing payment","zippayment"), 'error'); 113 113 } 114 114 return $result; … … 127 127 if (empty($order)) { 128 128 //if it can't find the order 129 wc_add_notice(__('Unable to find order by id: ' . $order_id, ' woothemes'), 'error');129 wc_add_notice(__('Unable to find order by id: ' . $order_id, 'zippayment'), 'error'); 130 130 return false; 131 131 } … … 142 142 143 143 if ($is_success == true) { 144 WC_Zipmoney_Payment_Gateway_Util::add_admin_notice( 'The zipMoney payment has been cancelled.', 'success');144 WC_Zipmoney_Payment_Gateway_Util::add_admin_notice(__('The zipMoney payment has been cancelled.','zippayment'), 'success'); 145 145 } else { 146 WC_Zipmoney_Payment_Gateway_Util::add_admin_notice( 'Unable to cancel payment.', 'error');146 WC_Zipmoney_Payment_Gateway_Util::add_admin_notice(__('Unable to cancel payment.','zippayment'), 'error'); 147 147 } 148 148 } … … 161 161 if (empty($order)) { 162 162 //if it can't find the order 163 wc_add_notice(__('Unable to find order by id: ' . $order_id, ' woothemes'), 'error');163 wc_add_notice(__('Unable to find order by id: ' . $order_id, 'zippayment'), 'error'); 164 164 return false; 165 165 } -
zipmoney-payments-woocommerce/trunk/includes/controller/class-wc-zipmoney-payment-checkout-controller.php
r2467646 r2560395 33 33 if (isset($checkout_response)) { 34 34 $WC_Zipmoney_Payment_Gateway_Config = $this->WC_Zipmoney_Payment_Gateway->WC_Zipmoney_Payment_Gateway_Config; 35 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_ bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_IS_IFRAME_FLOW);35 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow(); 36 36 $redirectUri = $checkout_response->getUri(); 37 37 $currency = get_option('woocommerce_currency'); … … 51 51 } 52 52 return array( 53 'message' => "An error occurred while getting the redirect url from Zip.",53 'message' => __("An error occurred while getting the redirect url from Zip.","zippayment"), 54 54 'result' => 'failure' 55 55 ); -
zipmoney-payments-woocommerce/trunk/includes/view/frontend/express_payment_button.php
r2283719 r2560395 10 10 11 11 // Is is iframe flow 12 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_ bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_IS_IFRAME_FLOW);12 $is_iframe_flow = $WC_Zipmoney_Payment_Gateway_Config->is_it_iframe_flow(); 13 13 if ($is_iframe_flow){ 14 14 ?> -
zipmoney-payments-woocommerce/trunk/vendor/zipmoney/merchantapi-php/lib/Model/CreateChargeRequest.php
r2467646 r2560395 143 143 $invalid_properties[] = "'currency' can't be null"; 144 144 } 145 $allowed_values = CurrencyUtil::isValidCurrency($this->container['currency']);146 if (!$allowed_values['valid']) {147 $invalid_properties[] = $allowed_values['message'];148 }149 145 150 146 return $invalid_properties; … … 169 165 return false; 170 166 } 171 $allowed_values = CurrencyUtil::isValidCurrency($this->container['currency']);172 if (!$allowed_values['valid']) {173 return false;174 }175 167 return true; 176 168 } … … 256 248 public function setCurrency($currency) 257 249 { 258 $allowed_values = CurrencyUtil::isValidCurrency($currency);259 if (!$allowed_values['valid']) {260 throw new \InvalidArgumentException($allowed_values['message']);261 }262 250 $this->container['currency'] = $currency; 263 251 -
zipmoney-payments-woocommerce/trunk/vendor/zipmoney/merchantapi-php/lib/Model/CurrencyUtil.php
r2464697 r2560395 19 19 const CURRENCY_ZAR = 'ZAR'; 20 20 const CURRENCY_CAD = 'CAD'; 21 const CURRENCY_MXN = 'MXN'; 21 22 22 23 /** … … 33 34 self::CURRENCY_ZAR, 34 35 self::CURRENCY_CAD, 36 self::CURRENCY_MXN, 35 37 ); 36 38 } … … 59 61 'za' => 'South Africa', 60 62 'ca' => 'Canada', 63 'mx' => 'Mexico', 61 64 ); 62 65 } -
zipmoney-payments-woocommerce/trunk/vendor/zipmoney/merchantapi-php/lib/Model/ShopperStatistics.php
r2467646 r2560395 172 172 $invalid_properties = array(); 173 173 174 $allowed_values = CurrencyUtil::isValidCurrency($this->container['currency']);175 if (!$allowed_values['valid']) {176 $invalid_properties[] = $allowed_values['message'];177 }178 179 174 $allowed_values = array("pass", "fail", "unknown"); 180 175 if (!in_array($this->container['fraud_check_result'], $allowed_values)) { … … 193 188 public function valid() 194 189 { 195 $allowed_values = CurrencyUtil::isValidCurrency($this->container['currency']);196 if (!$allowed_values['valid']) {197 return false;198 }199 190 $allowed_values = array("pass", "fail", "unknown"); 200 191 if (!in_array($this->container['fraud_check_result'], $allowed_values)) { … … 368 359 public function setCurrency($currency) 369 360 { 370 $allowed_values = CurrencyUtil::isValidCurrency($currency);371 if (!is_null($currency) && (!$allowed_values['valid'])) {372 throw new \InvalidArgumentException($allowed_values['message']);373 }374 361 $this->container['currency'] = $currency; 375 362 -
zipmoney-payments-woocommerce/trunk/zipmoney-payment-gateway.php
r2481936 r2560395 7 7 Give your customers the power to pay later, interest free and watch your sales grow. 8 8 Take advantage of our fast-growing customer base, proven revenue uplift, fast and simple integration. 9 * Version: 2.3. 39 * Version: 2.3.4 10 10 * Author: Zip 11 11 * Author URI: https://www.zip.co/ … … 15 15 * WC requires at least: 2.6.13 16 16 * WC tested up to: 4.8.0 17 * @version 2.3. 317 * @version 2.3.4 18 18 * @package Zip 19 19 * @author Zip … … 84 84 } 85 85 86 // load language file 87 function load_language() { 88 load_plugin_textdomain( 'zippayment', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 89 } 90 86 91 // Call the above function to begin execution of the plugin. 87 92 add_action('plugins_loaded', 'run_zipmoney_payment_gateway'); 93 add_action('plugins_loaded', 'load_language');
Note: See TracChangeset
for help on using the changeset viewer.