Changeset 2329004
- Timestamp:
- 06/23/2020 05:36:00 AM (6 years ago)
- Location:
- postpay
- Files:
-
- 4 deleted
- 13 edited
- 25 copied
-
tags/0.2.1 (copied) (copied from postpay/trunk)
-
tags/0.2.1/assets/images/logo-dark.png (deleted)
-
tags/0.2.1/assets/images/logo-light.png (deleted)
-
tags/0.2.1/assets/images/postpay-dark.png (copied) (copied from postpay/trunk/assets/images/postpay-dark.png)
-
tags/0.2.1/assets/images/postpay-light.png (copied) (copied from postpay/trunk/assets/images/postpay-light.png)
-
tags/0.2.1/assets/images/postpay-pay-now.png (copied) (copied from postpay/trunk/assets/images/postpay-pay-now.png)
-
tags/0.2.1/includes/class-wc-postpay-api.php (copied) (copied from postpay/trunk/includes/class-wc-postpay-api.php)
-
tags/0.2.1/includes/class-wc-postpay-gateway.php (deleted)
-
tags/0.2.1/includes/gateways (copied) (copied from postpay/trunk/includes/gateways)
-
tags/0.2.1/includes/gateways/class-wc-postpay-gateway.php (modified) (2 diffs)
-
tags/0.2.1/includes/http/class-wc-postpay-adapter.php (copied) (copied from postpay/trunk/includes/http/class-wc-postpay-adapter.php)
-
tags/0.2.1/includes/http/class-wc-postpay-client.php (copied) (copied from postpay/trunk/includes/http/class-wc-postpay-client.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-address.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-address.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-checkout.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-checkout.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-coupon.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-coupon.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-customer.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-customer.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-guest.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-guest.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-item.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-item.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-metadata.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-metadata.php)
-
tags/0.2.1/includes/request/class-wc-postpay-request-shipping.php (copied) (copied from postpay/trunk/includes/request/class-wc-postpay-request-shipping.php)
-
tags/0.2.1/includes/settings (copied) (copied from postpay/trunk/includes/settings)
-
tags/0.2.1/includes/wc-postpay-functions.php (modified) (2 diffs)
-
tags/0.2.1/includes/wc-postpay-scripts.php (copied) (copied from postpay/trunk/includes/wc-postpay-scripts.php)
-
tags/0.2.1/includes/wc-postpay-settings.php (deleted)
-
tags/0.2.1/languages/postpay-es_ES.mo (copied) (copied from postpay/trunk/languages/postpay-es_ES.mo)
-
tags/0.2.1/languages/postpay-es_ES.po (copied) (copied from postpay/trunk/languages/postpay-es_ES.po) (3 diffs)
-
tags/0.2.1/languages/postpay.pot (copied) (copied from postpay/trunk/languages/postpay.pot) (3 diffs)
-
tags/0.2.1/postpay.php (copied) (copied from postpay/trunk/postpay.php) (2 diffs)
-
tags/0.2.1/readme.txt (copied) (copied from postpay/trunk/readme.txt) (2 diffs)
-
tags/0.2.1/templates/payment-fields.php (copied) (copied from postpay/trunk/templates/payment-fields.php) (2 diffs)
-
tags/0.2.1/templates/widgets/cart.php (modified) (1 diff)
-
tags/0.2.1/templates/widgets/product.php (copied) (copied from postpay/trunk/templates/widgets/product.php) (1 diff)
-
trunk/includes/gateways/class-wc-postpay-gateway.php (modified) (2 diffs)
-
trunk/includes/wc-postpay-functions.php (modified) (2 diffs)
-
trunk/languages/postpay-es_ES.mo (modified) (previous)
-
trunk/languages/postpay-es_ES.po (modified) (3 diffs)
-
trunk/languages/postpay.pot (modified) (3 diffs)
-
trunk/postpay.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/payment-fields.php (modified) (2 diffs)
-
trunk/templates/widgets/cart.php (modified) (1 diff)
-
trunk/templates/widgets/product.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
postpay/tags/0.2.1/includes/gateways/class-wc-postpay-gateway.php
r2314090 r2329004 85 85 */ 86 86 public function payment_fields() { 87 if ( WC_Postpay::PAYMENT_GATEWAY_ID !== $this->id ) { 88 wc_postpay_script( 'wc-postpay-js' ); 89 } 87 wc_postpay_script( 'wc-postpay-js' ); 90 88 wc_get_postpay_template( 'payment-fields.php', array( 'gateway' => $this ) ); 91 89 } … … 217 215 public function load_scripts() { 218 216 if ( $this->is_available() && is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) { 217 wc_postpay_js( $this->settings ); 218 219 219 wc_postpay_script( 220 220 'wc-postpay-checkout', -
postpay/tags/0.2.1/includes/wc-postpay-functions.php
r2267104 r2329004 5 5 6 6 defined( 'ABSPATH' ) || exit; 7 8 /** 9 * Get Postpay template. 10 * 11 * @param string $template_name Template name. 12 * @param array $args Arguments. (default: array). 13 * @param string $template_path Template path. (default: ''). 14 */ 15 function wc_get_postpay_template( $template_name, $args = array(), $template_path = '' ) { 16 wc_get_template( $template_name, $args, $template_path, WC_POSTPAY_DIR_PATH . 'templates/' ); 17 } 7 18 8 19 /** … … 23 34 24 35 /** 25 * Get Postpay template.36 * Register and load postpay-js script. 26 37 * 27 * @param string $template_name Template name. 28 * @param array $args Arguments. (default: array). 29 * @param string $template_path Template path. (default: ''). 38 * @param array $settings Gateway settings. 30 39 */ 31 function wc_get_postpay_template( $template_name, $args = array(), $template_path = '' ) { 32 wc_get_template( $template_name, $args, $template_path, WC_POSTPAY_DIR_PATH . 'templates/' ); 40 function wc_postpay_js( $settings ) { 41 wc_postpay_script( 'wc-postpay-js' ); 42 43 wc_postpay_script( 44 'wc-postpay-init', 45 array( 46 'sandbox' => 'yes' === $settings['sandbox'], 47 'merchantId' => $settings['merchant_id'], 48 'theme' => $settings['theme'] ?? 'light', 49 ) 50 ); 33 51 } -
postpay/tags/0.2.1/languages/postpay-es_ES.po
r2314090 r2329004 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2. 0\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Language-Team: Spanish (Spain)\n" … … 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 "X-Generator: Poedit 2.3\n" 12 "POT-Creation-Date: 2020-0 5-27T07:04:33+00:00\n"13 "PO-Revision-Date: 2020-0 5-27 07:07+0000\n"12 "POT-Creation-Date: 2020-06-22T08:48:35+00:00\n" 13 "PO-Revision-Date: 2020-06-22 08:50+0000\n" 14 14 "X-Domain: postpay\n" 15 15 "Last-Translator: admin <dani@postpay.io>\n" … … 45 45 46 46 #. translators: %1$s: transaction id %2$s: error code 47 #: includes/gateways/class-wc-postpay-gateway.php:14 447 #: includes/gateways/class-wc-postpay-gateway.php:142 48 48 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 49 49 msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s." 50 50 51 #: includes/gateways/class-wc-postpay-gateway.php:15 351 #: includes/gateways/class-wc-postpay-gateway.php:151 52 52 msgid "Postpay capture error." 53 53 msgstr "Postpay error de captura." 54 54 55 55 #. translators: %1$s: order status %2$s: transaction id 56 #: includes/gateways/class-wc-postpay-gateway.php:17 256 #: includes/gateways/class-wc-postpay-gateway.php:170 57 57 msgid "Postpay order %1$s. ID: %2$s." 58 58 msgstr "Postpay pedido %1$s. ID: %2$s." 59 59 60 #: includes/gateways/class-wc-postpay-gateway.php:17 960 #: includes/gateways/class-wc-postpay-gateway.php:177 61 61 msgid "Postpay order cancelled." 62 62 msgstr "Postpay pedido cancelado." 63 63 64 64 #. translators: %1$s: transaction id %2$s: error code 65 #: includes/gateways/class-wc-postpay-gateway.php:20 365 #: includes/gateways/class-wc-postpay-gateway.php:201 66 66 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 67 67 msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s." -
postpay/tags/0.2.1/languages/postpay.pot
r2314090 r2329004 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2. 0\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2020-0 5-27T07:04:33+00:00\n"12 "POT-Creation-Date: 2020-06-22T08:48:35+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 42 42 43 43 #. translators: %1$s: transaction id %2$s: error code 44 #: includes/gateways/class-wc-postpay-gateway.php:14 444 #: includes/gateways/class-wc-postpay-gateway.php:142 45 45 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 46 46 msgstr "" 47 47 48 #: includes/gateways/class-wc-postpay-gateway.php:15 348 #: includes/gateways/class-wc-postpay-gateway.php:151 49 49 msgid "Postpay capture error." 50 50 msgstr "" 51 51 52 52 #. translators: %1$s: order status %2$s: transaction id 53 #: includes/gateways/class-wc-postpay-gateway.php:17 253 #: includes/gateways/class-wc-postpay-gateway.php:170 54 54 msgid "Postpay order %1$s. ID: %2$s." 55 55 msgstr "" 56 56 57 #: includes/gateways/class-wc-postpay-gateway.php:17 957 #: includes/gateways/class-wc-postpay-gateway.php:177 58 58 msgid "Postpay order cancelled." 59 59 msgstr "" 60 60 61 61 #. translators: %1$s: transaction id %2$s: error code 62 #: includes/gateways/class-wc-postpay-gateway.php:20 362 #: includes/gateways/class-wc-postpay-gateway.php:201 63 63 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 64 64 msgstr "" -
postpay/tags/0.2.1/postpay.php
r2314090 r2329004 2 2 /** 3 3 * Plugin Name: WooCommerce Postpay Payment Gateway 4 * Version: 0.2. 04 * Version: 0.2.1 5 5 * Plugin URI: https://github.com/postpayio/woocommerce 6 6 * Description: Buy now and pay later with zero interest and zero fees. … … 122 122 */ 123 123 public function load_scripts() { 124 if ( $this->enabled ) { 125 wc_postpay_script( 'wc-postpay-js' ); 126 127 wc_postpay_script( 128 'wc-postpay-init', 129 array( 130 'sandbox' => 'yes' === $this->settings['sandbox'], 131 'merchantId' => $this->settings['merchant_id'], 132 'theme' => $this->settings['theme'] ?? 'light', 133 ) 134 ); 124 if ( $this->enabled && ! is_checkout() ) { 125 wc_postpay_js( $this->settings ); 135 126 } 136 127 } -
postpay/tags/0.2.1/readme.txt
r2314090 r2329004 4 4 Tested up to: 5.4 5 5 Requires PHP: 5.6 6 Stable tag: 0.2. 07 Version: 0.2. 06 Stable tag: 0.2.1 7 Version: 0.2.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 73 73 == Changelog == 74 74 75 = 0.2.1 - 2020-06-22 = 76 * Improved checkout widgets settings 77 * Added widgets locale attribute 78 75 79 = 0.2.0 - 2020-05-29 = 76 80 * Added Pay Now payment gateway -
postpay/tags/0.2.1/templates/payment-fields.php
r2314090 r2329004 7 7 ?> 8 8 9 <?php if ( $gateway->widget ) : ?>9 <?php if ( $gateway->widget && ! isset( $_GET['pay_for_order'] ) ) : ?> 10 10 <div 11 class=" postpay-widget"11 class="<?php echo $gateway->id; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>-widget" 12 12 data-type="payment-summary" 13 13 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 14 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 15 15 data-country="<?php echo WC()->customer->get_billing_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 16 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 16 17 data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 17 <?php if ( WC_Postpay::PAYMENT_GATEWAY_ID !== $gateway->id ) : ?>18 18 data-merchant-id="<?php echo $gateway->get_option( 'merchant_id' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 19 19 data-sandbox="<?php echo $gateway->sandbox; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 20 20 data-theme="<?php echo $gateway->theme; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 21 <?php endif; ?>22 21 <?php if ( null !== $gateway::NUM_INSTALMENTS ) : ?> 23 22 data-num-instalments="<?php echo $gateway::NUM_INSTALMENTS; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" … … 28 27 jQuery( document ).ready( 29 28 function( $ ) { 30 postpay.ui.refresh( );29 postpay.ui.refresh( '.<?php echo $gateway->id; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>-widget' ); 31 30 } 32 31 ); -
postpay/tags/0.2.1/templates/widgets/cart.php
r2299357 r2329004 12 12 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 13 13 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 15 ></div> -
postpay/tags/0.2.1/templates/widgets/product.php
r2314090 r2329004 16 16 data-amount="<?php echo WC_Postpay_Adapter::decimal( $price )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 17 17 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 18 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 18 19 ></div> -
postpay/trunk/includes/gateways/class-wc-postpay-gateway.php
r2314090 r2329004 85 85 */ 86 86 public function payment_fields() { 87 if ( WC_Postpay::PAYMENT_GATEWAY_ID !== $this->id ) { 88 wc_postpay_script( 'wc-postpay-js' ); 89 } 87 wc_postpay_script( 'wc-postpay-js' ); 90 88 wc_get_postpay_template( 'payment-fields.php', array( 'gateway' => $this ) ); 91 89 } … … 217 215 public function load_scripts() { 218 216 if ( $this->is_available() && is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) { 217 wc_postpay_js( $this->settings ); 218 219 219 wc_postpay_script( 220 220 'wc-postpay-checkout', -
postpay/trunk/includes/wc-postpay-functions.php
r2267104 r2329004 5 5 6 6 defined( 'ABSPATH' ) || exit; 7 8 /** 9 * Get Postpay template. 10 * 11 * @param string $template_name Template name. 12 * @param array $args Arguments. (default: array). 13 * @param string $template_path Template path. (default: ''). 14 */ 15 function wc_get_postpay_template( $template_name, $args = array(), $template_path = '' ) { 16 wc_get_template( $template_name, $args, $template_path, WC_POSTPAY_DIR_PATH . 'templates/' ); 17 } 7 18 8 19 /** … … 23 34 24 35 /** 25 * Get Postpay template.36 * Register and load postpay-js script. 26 37 * 27 * @param string $template_name Template name. 28 * @param array $args Arguments. (default: array). 29 * @param string $template_path Template path. (default: ''). 38 * @param array $settings Gateway settings. 30 39 */ 31 function wc_get_postpay_template( $template_name, $args = array(), $template_path = '' ) { 32 wc_get_template( $template_name, $args, $template_path, WC_POSTPAY_DIR_PATH . 'templates/' ); 40 function wc_postpay_js( $settings ) { 41 wc_postpay_script( 'wc-postpay-js' ); 42 43 wc_postpay_script( 44 'wc-postpay-init', 45 array( 46 'sandbox' => 'yes' === $settings['sandbox'], 47 'merchantId' => $settings['merchant_id'], 48 'theme' => $settings['theme'] ?? 'light', 49 ) 50 ); 33 51 } -
postpay/trunk/languages/postpay-es_ES.po
r2314090 r2329004 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2. 0\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Language-Team: Spanish (Spain)\n" … … 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 "X-Generator: Poedit 2.3\n" 12 "POT-Creation-Date: 2020-0 5-27T07:04:33+00:00\n"13 "PO-Revision-Date: 2020-0 5-27 07:07+0000\n"12 "POT-Creation-Date: 2020-06-22T08:48:35+00:00\n" 13 "PO-Revision-Date: 2020-06-22 08:50+0000\n" 14 14 "X-Domain: postpay\n" 15 15 "Last-Translator: admin <dani@postpay.io>\n" … … 45 45 46 46 #. translators: %1$s: transaction id %2$s: error code 47 #: includes/gateways/class-wc-postpay-gateway.php:14 447 #: includes/gateways/class-wc-postpay-gateway.php:142 48 48 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 49 49 msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s." 50 50 51 #: includes/gateways/class-wc-postpay-gateway.php:15 351 #: includes/gateways/class-wc-postpay-gateway.php:151 52 52 msgid "Postpay capture error." 53 53 msgstr "Postpay error de captura." 54 54 55 55 #. translators: %1$s: order status %2$s: transaction id 56 #: includes/gateways/class-wc-postpay-gateway.php:17 256 #: includes/gateways/class-wc-postpay-gateway.php:170 57 57 msgid "Postpay order %1$s. ID: %2$s." 58 58 msgstr "Postpay pedido %1$s. ID: %2$s." 59 59 60 #: includes/gateways/class-wc-postpay-gateway.php:17 960 #: includes/gateways/class-wc-postpay-gateway.php:177 61 61 msgid "Postpay order cancelled." 62 62 msgstr "Postpay pedido cancelado." 63 63 64 64 #. translators: %1$s: transaction id %2$s: error code 65 #: includes/gateways/class-wc-postpay-gateway.php:20 365 #: includes/gateways/class-wc-postpay-gateway.php:201 66 66 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 67 67 msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s." -
postpay/trunk/languages/postpay.pot
r2314090 r2329004 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2. 0\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.2.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2020-0 5-27T07:04:33+00:00\n"12 "POT-Creation-Date: 2020-06-22T08:48:35+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 42 42 43 43 #. translators: %1$s: transaction id %2$s: error code 44 #: includes/gateways/class-wc-postpay-gateway.php:14 444 #: includes/gateways/class-wc-postpay-gateway.php:142 45 45 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 46 46 msgstr "" 47 47 48 #: includes/gateways/class-wc-postpay-gateway.php:15 348 #: includes/gateways/class-wc-postpay-gateway.php:151 49 49 msgid "Postpay capture error." 50 50 msgstr "" 51 51 52 52 #. translators: %1$s: order status %2$s: transaction id 53 #: includes/gateways/class-wc-postpay-gateway.php:17 253 #: includes/gateways/class-wc-postpay-gateway.php:170 54 54 msgid "Postpay order %1$s. ID: %2$s." 55 55 msgstr "" 56 56 57 #: includes/gateways/class-wc-postpay-gateway.php:17 957 #: includes/gateways/class-wc-postpay-gateway.php:177 58 58 msgid "Postpay order cancelled." 59 59 msgstr "" 60 60 61 61 #. translators: %1$s: transaction id %2$s: error code 62 #: includes/gateways/class-wc-postpay-gateway.php:20 362 #: includes/gateways/class-wc-postpay-gateway.php:201 63 63 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 64 64 msgstr "" -
postpay/trunk/postpay.php
r2314090 r2329004 2 2 /** 3 3 * Plugin Name: WooCommerce Postpay Payment Gateway 4 * Version: 0.2. 04 * Version: 0.2.1 5 5 * Plugin URI: https://github.com/postpayio/woocommerce 6 6 * Description: Buy now and pay later with zero interest and zero fees. … … 122 122 */ 123 123 public function load_scripts() { 124 if ( $this->enabled ) { 125 wc_postpay_script( 'wc-postpay-js' ); 126 127 wc_postpay_script( 128 'wc-postpay-init', 129 array( 130 'sandbox' => 'yes' === $this->settings['sandbox'], 131 'merchantId' => $this->settings['merchant_id'], 132 'theme' => $this->settings['theme'] ?? 'light', 133 ) 134 ); 124 if ( $this->enabled && ! is_checkout() ) { 125 wc_postpay_js( $this->settings ); 135 126 } 136 127 } -
postpay/trunk/readme.txt
r2314090 r2329004 4 4 Tested up to: 5.4 5 5 Requires PHP: 5.6 6 Stable tag: 0.2. 07 Version: 0.2. 06 Stable tag: 0.2.1 7 Version: 0.2.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 73 73 == Changelog == 74 74 75 = 0.2.1 - 2020-06-22 = 76 * Improved checkout widgets settings 77 * Added widgets locale attribute 78 75 79 = 0.2.0 - 2020-05-29 = 76 80 * Added Pay Now payment gateway -
postpay/trunk/templates/payment-fields.php
r2314090 r2329004 7 7 ?> 8 8 9 <?php if ( $gateway->widget ) : ?>9 <?php if ( $gateway->widget && ! isset( $_GET['pay_for_order'] ) ) : ?> 10 10 <div 11 class=" postpay-widget"11 class="<?php echo $gateway->id; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>-widget" 12 12 data-type="payment-summary" 13 13 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 14 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 15 15 data-country="<?php echo WC()->customer->get_billing_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 16 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 16 17 data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 17 <?php if ( WC_Postpay::PAYMENT_GATEWAY_ID !== $gateway->id ) : ?>18 18 data-merchant-id="<?php echo $gateway->get_option( 'merchant_id' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 19 19 data-sandbox="<?php echo $gateway->sandbox; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 20 20 data-theme="<?php echo $gateway->theme; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 21 <?php endif; ?>22 21 <?php if ( null !== $gateway::NUM_INSTALMENTS ) : ?> 23 22 data-num-instalments="<?php echo $gateway::NUM_INSTALMENTS; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" … … 28 27 jQuery( document ).ready( 29 28 function( $ ) { 30 postpay.ui.refresh( );29 postpay.ui.refresh( '.<?php echo $gateway->id; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>-widget' ); 31 30 } 32 31 ); -
postpay/trunk/templates/widgets/cart.php
r2299357 r2329004 12 12 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 13 13 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 15 ></div> -
postpay/trunk/templates/widgets/product.php
r2314090 r2329004 16 16 data-amount="<?php echo WC_Postpay_Adapter::decimal( $price )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 17 17 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 18 data-locale="<?php echo get_locale(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 18 19 ></div>
Note: See TracChangeset
for help on using the changeset viewer.