Plugin Directory

Changeset 2270251


Ignore:
Timestamp:
03/29/2020 04:56:51 PM (6 years ago)
Author:
postpay
Message:

v0.1.2

Location:
postpay
Files:
15 edited
13 copied

Legend:

Unmodified
Added
Removed
  • postpay/tags/0.1.2/includes/class-wc-postpay-gateway.php

    r2267104 r2270251  
    5454
    5555    /**
     56     * Check if the gateway is available for use.
     57     *
     58     * @return bool
     59     */
     60    public function is_available() {
     61        return (
     62            parent::is_available() &&
     63            ! empty( $this->get_option( 'merchant_id' ) ) &&
     64            ! empty( $this->get_secret_key() )
     65        );
     66    }
     67
     68    /**
    5669     * Initialise settings form fields.
    5770     */
     
    6174
    6275    /**
    63      * Builds our payment fields area.
     76     * Get secret key.
     77     *
     78     * @return string
     79     */
     80    public function get_secret_key() {
     81        return $this->sandbox ? $this->get_option( 'sandbox_secret_key' ) : $this->get_option( 'secret_key' );
     82    }
     83
     84    /**
     85     * Build the payment fields area.
    6486     */
    6587    public function payment_fields() {
     
    169191            $this->adapter->refund( $transaction_id, $refund_id, $amount, $reason );
    170192        } catch ( ApiException $e ) {
    171             $order->add_order_note(
     193            return new WP_Error(
     194                'refund_error',
    172195                sprintf( /* translators: %1$s: transaction id %2$s: error code */
    173196                    __( 'Postpay refund failed. ID: %1$s. Code: %2$s.', 'postpay' ),
     
    176199                )
    177200            );
    178             return false;
     201        } catch ( Exception $e ) {
     202            return new WP_Error( 'refund_error', $e->getMessage() );
    179203        }
    180204        return true;
     
    185209     */
    186210    public function load_scripts() {
    187         if ( ! $this->is_available() ) {
    188             return;
    189         }
    190 
    191         if ( is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) {
     211        if ( $this->is_available() && is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) {
    192212            wc_postpay_script(
    193213                'wc-postpay-checkout',
  • postpay/tags/0.1.2/includes/http/class-wc-postpay-adapter.php

    r2267312 r2270251  
    3838        require_once WC_POSTPAY_DIR_PATH . 'includes/http/class-wc-postpay-client.php';
    3939
    40         $this->client = new Postpay(
    41             array(
    42                 'sandbox'        => $gateway->sandbox,
    43                 'merchant_id'    => $gateway->get_option( 'merchant_id' ),
    44                 'secret_key'     => $gateway->get_option( 'sandbox_secret_key' ),
    45                 'client_handler' => new WC_Postpay_Client(),
    46             )
    47         );
     40        if ( $this->gateway->is_available() ) {
     41            $this->client = new Postpay(
     42                array(
     43                    'sandbox'        => $gateway->sandbox,
     44                    'merchant_id'    => $gateway->get_option( 'merchant_id' ),
     45                    'secret_key'     => $gateway->get_secret_key(),
     46                    'client_handler' => new WC_Postpay_Client(),
     47                )
     48            );
     49        }
    4850    }
    4951
     
    5759     * @return array
    5860     *
     61     * @throws Exception If payment method is not properly configured.
    5962     * @throws ApiException If response status code is invalid.
    6063     */
    6164    public function request( $method, $path, $params = array() ) {
     65        if ( ! $this->gateway->is_available() ) {
     66            throw new Exception( __( 'Postpay is not properly configured.', 'postpay' ) );
     67        }
     68
    6269        try {
    6370            $response = $this->client->request( $method, $path, $params );
     
    8794     * @return array
    8895     *
     96     * @throws Exception If payment method is not properly configured.
    8997     * @throws ApiException If response status code is invalid.
    9098     */
     
    100108     * @return array
    101109     *
     110     * @throws Exception If payment method is not properly configured.
    102111     * @throws ApiException If response status code is invalid.
    103112     */
     
    114123     * @return array
    115124     *
     125     * @throws Exception If payment method is not properly configured.
    116126     * @throws ApiException If response status code is invalid.
    117127     */
     
    130140     * @return array
    131141     *
     142     * @throws Exception If payment method is not properly configured.
    132143     * @throws ApiException If response status code is invalid.
    133144     */
  • postpay/tags/0.1.2/languages/postpay-es_ES.po

    r2267312 r2270251  
    55"Project-Id-Version: Postpay 0.1.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    7 "Language-Team: \n"
     7"Language-Team: Spanish (Spain)\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "POT-Creation-Date: 2020-03-25T03:33:01+00:00\n"
    12 "PO-Revision-Date: 2020-03-25 11:40+0700\n"
     11"POT-Creation-Date: 2020-03-29T16:27:19+00:00\n"
     12"PO-Revision-Date: 2020-03-29 16:45+0000\n"
    1313"X-Generator: Poedit 2.3\n"
    1414"X-Domain: postpay\n"
    15 "Last-Translator: \n"
     15"Last-Translator: mongkok <dani@postpay.io>\n"
    1616"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    17 "Language: es\n"
     17"Language: es_ES\n"
    1818
    1919#. Plugin Name of the plugin
    20 #. Author of the plugin
    21 #: includes/class-wc-postpay-gateway.php:28 includes/wc-postpay-settings.php:19
    22 msgid "Postpay"
     20msgid "WooCommerce Postpay Payment Gateway"
    2321msgstr ""
    2422
     
    3129msgid "Buy now and pay later with zero interest and zero fees."
    3230msgstr "Compra ahora y paga más tarde con cero interés y sin cargos."
     31
     32#. Plugin Name of the plugin
     33#. Author of the plugin
     34#: includes/class-wc-postpay-gateway.php:28 includes/wc-postpay-settings.php:19
     35msgid "Postpay"
     36msgstr ""
    3337
    3438#. Author URI of the plugin
     
    4549
    4650#. translators: %1$s: transaction id %2$s: error code
    47 #: includes/class-wc-postpay-gateway.php:119
     51#: includes/class-wc-postpay-gateway.php:141
    4852msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    4953msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s."
    5054
    51 #: includes/class-wc-postpay-gateway.php:128
     55#: includes/class-wc-postpay-gateway.php:150
    5256msgid "Postpay capture error."
    5357msgstr "Postpay error de captura."
    5458
    5559#. translators: %1$s: transaction id %2$s: order status
    56 #: includes/class-wc-postpay-gateway.php:144
     60#: includes/class-wc-postpay-gateway.php:166
    5761msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    5862msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s."
    5963
    60 #: includes/class-wc-postpay-gateway.php:150
     64#: includes/class-wc-postpay-gateway.php:172
    6165msgid "Postpay order cancelled."
    6266msgstr "Postpay pedido cancelado."
    6367
    6468#. translators: %1$s: transaction id %2$s: error code
    65 #: includes/class-wc-postpay-gateway.php:173
     69#: includes/class-wc-postpay-gateway.php:196
    6670msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    6771msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s."
     72
     73#: includes/http/class-wc-postpay-adapter.php:66
     74msgid "Postpay is not properly configured."
     75msgstr "Postpay no está configurado correctamente."
    6876
    6977#: includes/wc-postpay-settings.php:10
     
    8189#: includes/wc-postpay-settings.php:18
    8290msgid "This controls the title which the user sees during checkout."
    83 msgstr "Esto controla el título que el usuario ve durante el proceso de compra."
     91msgstr ""
     92"Esto controla el título que el usuario ve durante el proceso de compra."
    8493
    8594#: includes/wc-postpay-settings.php:23
     
    8998#: includes/wc-postpay-settings.php:26
    9099msgid "This controls the description which the user sees during checkout."
    91 msgstr "Esto controla la descripción que el usuario ve durante el proceso de compra."
     100msgstr ""
     101"Esto controla la descripción que el usuario ve durante el proceso de compra."
    92102
    93103#: includes/wc-postpay-settings.php:30
     
    137147#: includes/wc-postpay-settings.php:62
    138148msgid "Checkout flow that keeps customers local to your website."
    139 msgstr "Proceso de checkout que mantiene a los clientes localizados en su sitio web."
     149msgstr ""
     150"Proceso de checkout que mantiene a los clientes localizados en su sitio web."
    140151
    141152#: includes/wc-postpay-settings.php:65
     
    175186msgstr "Mostrar un mensaje promocional en la página del carrito."
    176187
    177 #: postpay.php:109
     188#: postpay.php:111
    178189msgid "Settings"
    179190msgstr "Configuración"
  • postpay/tags/0.1.2/languages/postpay.pot

    r2267312 r2270251  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Postpay 0.1.1\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-03-25T03:33:01+00:00\n"
     12"POT-Creation-Date: 2020-03-29T16:27:19+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 #. Author of the plugin
    19 #: includes/class-wc-postpay-gateway.php:28
    20 #: includes/wc-postpay-settings.php:19
    21 msgid "Postpay"
     18msgid "WooCommerce Postpay Payment Gateway"
    2219msgstr ""
    2320
     
    3027#: includes/wc-postpay-settings.php:27
    3128msgid "Buy now and pay later with zero interest and zero fees."
     29msgstr ""
     30
     31#. Author of the plugin
     32#: includes/class-wc-postpay-gateway.php:28
     33#: includes/wc-postpay-settings.php:19
     34msgid "Postpay"
    3235msgstr ""
    3336
     
    4548
    4649#. translators: %1$s: transaction id %2$s: error code
    47 #: includes/class-wc-postpay-gateway.php:119
     50#: includes/class-wc-postpay-gateway.php:141
    4851msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    4952msgstr ""
    5053
    51 #: includes/class-wc-postpay-gateway.php:128
     54#: includes/class-wc-postpay-gateway.php:150
    5255msgid "Postpay capture error."
    5356msgstr ""
    5457
    5558#. translators: %1$s: transaction id %2$s: order status
    56 #: includes/class-wc-postpay-gateway.php:144
     59#: includes/class-wc-postpay-gateway.php:166
    5760msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    5861msgstr ""
    5962
    60 #: includes/class-wc-postpay-gateway.php:150
     63#: includes/class-wc-postpay-gateway.php:172
    6164msgid "Postpay order cancelled."
    6265msgstr ""
    6366
    6467#. translators: %1$s: transaction id %2$s: error code
    65 #: includes/class-wc-postpay-gateway.php:173
     68#: includes/class-wc-postpay-gateway.php:196
    6669msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
     70msgstr ""
     71
     72#: includes/http/class-wc-postpay-adapter.php:66
     73msgid "Postpay is not properly configured."
    6774msgstr ""
    6875
     
    175182msgstr ""
    176183
    177 #: postpay.php:109
     184#: postpay.php:111
    178185msgid "Settings"
    179186msgstr ""
  • postpay/tags/0.1.2/postpay.php

    r2267312 r2270251  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.1
     4 * Version: 0.1.2
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
     
    6262
    6363        $this->settings = get_option( 'woocommerce_' . self::PAYMENT_GATEWAY_ID . '_settings' );
    64         $this->enabled  = 'yes' === $this->settings['enabled'];
     64        $this->enabled  = 'yes' === $this->settings['enabled'] && ! empty( $this->settings['merchant_id'] );
    6565
    6666        if ( ! class_exists( '\\Postpay\\Postpay' ) ) {
  • postpay/tags/0.1.2/readme.txt

    r2267312 r2270251  
    44Tested up to: 5.3.2
    55Requires PHP: 5.6
    6 Stable tag: 0.1.1
    7 Version: 0.1.1
     6Stable tag: 0.1.2
     7Version: 0.1.2
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7373== Changelog ==
    7474
     75= 0.1.2 - 2020-03-30 =
     76* Disabled module if merchantId is not defined
     77* Added is_available method to WC_Postpay_Gateway
     78* Returned WP_Error instance on refund errors
     79
    7580= 0.1.1 - 2020-03-25 =
    7681* Renamed plugin
  • postpay/tags/0.1.2/vendor/autoload.php

    r2267104 r2270251  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83::getLoader();
     7return ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227::getLoader();
  • postpay/tags/0.1.2/vendor/composer/autoload_real.php

    r2267104 r2270251  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83
     5class ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
  • postpay/tags/0.1.2/vendor/composer/autoload_static.php

    r2267104 r2270251  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83
     7class ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3232    {
    3333        return \Closure::bind(function () use ($loader) {
    34             $loader->prefixLengthsPsr4 = ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::$prefixLengthsPsr4;
    35             $loader->prefixDirsPsr4 = ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::$prefixDirsPsr4;
     34            $loader->prefixLengthsPsr4 = ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::$prefixLengthsPsr4;
     35            $loader->prefixDirsPsr4 = ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::$prefixDirsPsr4;
    3636
    3737        }, null, ClassLoader::class);
  • postpay/trunk/includes/class-wc-postpay-gateway.php

    r2267104 r2270251  
    5454
    5555    /**
     56     * Check if the gateway is available for use.
     57     *
     58     * @return bool
     59     */
     60    public function is_available() {
     61        return (
     62            parent::is_available() &&
     63            ! empty( $this->get_option( 'merchant_id' ) ) &&
     64            ! empty( $this->get_secret_key() )
     65        );
     66    }
     67
     68    /**
    5669     * Initialise settings form fields.
    5770     */
     
    6174
    6275    /**
    63      * Builds our payment fields area.
     76     * Get secret key.
     77     *
     78     * @return string
     79     */
     80    public function get_secret_key() {
     81        return $this->sandbox ? $this->get_option( 'sandbox_secret_key' ) : $this->get_option( 'secret_key' );
     82    }
     83
     84    /**
     85     * Build the payment fields area.
    6486     */
    6587    public function payment_fields() {
     
    169191            $this->adapter->refund( $transaction_id, $refund_id, $amount, $reason );
    170192        } catch ( ApiException $e ) {
    171             $order->add_order_note(
     193            return new WP_Error(
     194                'refund_error',
    172195                sprintf( /* translators: %1$s: transaction id %2$s: error code */
    173196                    __( 'Postpay refund failed. ID: %1$s. Code: %2$s.', 'postpay' ),
     
    176199                )
    177200            );
    178             return false;
     201        } catch ( Exception $e ) {
     202            return new WP_Error( 'refund_error', $e->getMessage() );
    179203        }
    180204        return true;
     
    185209     */
    186210    public function load_scripts() {
    187         if ( ! $this->is_available() ) {
    188             return;
    189         }
    190 
    191         if ( is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) {
     211        if ( $this->is_available() && is_checkout() && ! empty( $_GET[ $this->token_param ] ) ) {
    192212            wc_postpay_script(
    193213                'wc-postpay-checkout',
  • postpay/trunk/includes/http/class-wc-postpay-adapter.php

    r2267312 r2270251  
    3838        require_once WC_POSTPAY_DIR_PATH . 'includes/http/class-wc-postpay-client.php';
    3939
    40         $this->client = new Postpay(
    41             array(
    42                 'sandbox'        => $gateway->sandbox,
    43                 'merchant_id'    => $gateway->get_option( 'merchant_id' ),
    44                 'secret_key'     => $gateway->get_option( 'sandbox_secret_key' ),
    45                 'client_handler' => new WC_Postpay_Client(),
    46             )
    47         );
     40        if ( $this->gateway->is_available() ) {
     41            $this->client = new Postpay(
     42                array(
     43                    'sandbox'        => $gateway->sandbox,
     44                    'merchant_id'    => $gateway->get_option( 'merchant_id' ),
     45                    'secret_key'     => $gateway->get_secret_key(),
     46                    'client_handler' => new WC_Postpay_Client(),
     47                )
     48            );
     49        }
    4850    }
    4951
     
    5759     * @return array
    5860     *
     61     * @throws Exception If payment method is not properly configured.
    5962     * @throws ApiException If response status code is invalid.
    6063     */
    6164    public function request( $method, $path, $params = array() ) {
     65        if ( ! $this->gateway->is_available() ) {
     66            throw new Exception( __( 'Postpay is not properly configured.', 'postpay' ) );
     67        }
     68
    6269        try {
    6370            $response = $this->client->request( $method, $path, $params );
     
    8794     * @return array
    8895     *
     96     * @throws Exception If payment method is not properly configured.
    8997     * @throws ApiException If response status code is invalid.
    9098     */
     
    100108     * @return array
    101109     *
     110     * @throws Exception If payment method is not properly configured.
    102111     * @throws ApiException If response status code is invalid.
    103112     */
     
    114123     * @return array
    115124     *
     125     * @throws Exception If payment method is not properly configured.
    116126     * @throws ApiException If response status code is invalid.
    117127     */
     
    130140     * @return array
    131141     *
     142     * @throws Exception If payment method is not properly configured.
    132143     * @throws ApiException If response status code is invalid.
    133144     */
  • postpay/trunk/languages/postpay-es_ES.po

    r2267312 r2270251  
    55"Project-Id-Version: Postpay 0.1.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    7 "Language-Team: \n"
     7"Language-Team: Spanish (Spain)\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "POT-Creation-Date: 2020-03-25T03:33:01+00:00\n"
    12 "PO-Revision-Date: 2020-03-25 11:40+0700\n"
     11"POT-Creation-Date: 2020-03-29T16:27:19+00:00\n"
     12"PO-Revision-Date: 2020-03-29 16:45+0000\n"
    1313"X-Generator: Poedit 2.3\n"
    1414"X-Domain: postpay\n"
    15 "Last-Translator: \n"
     15"Last-Translator: mongkok <dani@postpay.io>\n"
    1616"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    17 "Language: es\n"
     17"Language: es_ES\n"
    1818
    1919#. Plugin Name of the plugin
    20 #. Author of the plugin
    21 #: includes/class-wc-postpay-gateway.php:28 includes/wc-postpay-settings.php:19
    22 msgid "Postpay"
     20msgid "WooCommerce Postpay Payment Gateway"
    2321msgstr ""
    2422
     
    3129msgid "Buy now and pay later with zero interest and zero fees."
    3230msgstr "Compra ahora y paga más tarde con cero interés y sin cargos."
     31
     32#. Plugin Name of the plugin
     33#. Author of the plugin
     34#: includes/class-wc-postpay-gateway.php:28 includes/wc-postpay-settings.php:19
     35msgid "Postpay"
     36msgstr ""
    3337
    3438#. Author URI of the plugin
     
    4549
    4650#. translators: %1$s: transaction id %2$s: error code
    47 #: includes/class-wc-postpay-gateway.php:119
     51#: includes/class-wc-postpay-gateway.php:141
    4852msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    4953msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s."
    5054
    51 #: includes/class-wc-postpay-gateway.php:128
     55#: includes/class-wc-postpay-gateway.php:150
    5256msgid "Postpay capture error."
    5357msgstr "Postpay error de captura."
    5458
    5559#. translators: %1$s: transaction id %2$s: order status
    56 #: includes/class-wc-postpay-gateway.php:144
     60#: includes/class-wc-postpay-gateway.php:166
    5761msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    5862msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s."
    5963
    60 #: includes/class-wc-postpay-gateway.php:150
     64#: includes/class-wc-postpay-gateway.php:172
    6165msgid "Postpay order cancelled."
    6266msgstr "Postpay pedido cancelado."
    6367
    6468#. translators: %1$s: transaction id %2$s: error code
    65 #: includes/class-wc-postpay-gateway.php:173
     69#: includes/class-wc-postpay-gateway.php:196
    6670msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    6771msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s."
     72
     73#: includes/http/class-wc-postpay-adapter.php:66
     74msgid "Postpay is not properly configured."
     75msgstr "Postpay no está configurado correctamente."
    6876
    6977#: includes/wc-postpay-settings.php:10
     
    8189#: includes/wc-postpay-settings.php:18
    8290msgid "This controls the title which the user sees during checkout."
    83 msgstr "Esto controla el título que el usuario ve durante el proceso de compra."
     91msgstr ""
     92"Esto controla el título que el usuario ve durante el proceso de compra."
    8493
    8594#: includes/wc-postpay-settings.php:23
     
    8998#: includes/wc-postpay-settings.php:26
    9099msgid "This controls the description which the user sees during checkout."
    91 msgstr "Esto controla la descripción que el usuario ve durante el proceso de compra."
     100msgstr ""
     101"Esto controla la descripción que el usuario ve durante el proceso de compra."
    92102
    93103#: includes/wc-postpay-settings.php:30
     
    137147#: includes/wc-postpay-settings.php:62
    138148msgid "Checkout flow that keeps customers local to your website."
    139 msgstr "Proceso de checkout que mantiene a los clientes localizados en su sitio web."
     149msgstr ""
     150"Proceso de checkout que mantiene a los clientes localizados en su sitio web."
    140151
    141152#: includes/wc-postpay-settings.php:65
     
    175186msgstr "Mostrar un mensaje promocional en la página del carrito."
    176187
    177 #: postpay.php:109
     188#: postpay.php:111
    178189msgid "Settings"
    179190msgstr "Configuración"
  • postpay/trunk/languages/postpay.pot

    r2267312 r2270251  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Postpay 0.1.1\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-03-25T03:33:01+00:00\n"
     12"POT-Creation-Date: 2020-03-29T16:27:19+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 #. Author of the plugin
    19 #: includes/class-wc-postpay-gateway.php:28
    20 #: includes/wc-postpay-settings.php:19
    21 msgid "Postpay"
     18msgid "WooCommerce Postpay Payment Gateway"
    2219msgstr ""
    2320
     
    3027#: includes/wc-postpay-settings.php:27
    3128msgid "Buy now and pay later with zero interest and zero fees."
     29msgstr ""
     30
     31#. Author of the plugin
     32#: includes/class-wc-postpay-gateway.php:28
     33#: includes/wc-postpay-settings.php:19
     34msgid "Postpay"
    3235msgstr ""
    3336
     
    4548
    4649#. translators: %1$s: transaction id %2$s: error code
    47 #: includes/class-wc-postpay-gateway.php:119
     50#: includes/class-wc-postpay-gateway.php:141
    4851msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    4952msgstr ""
    5053
    51 #: includes/class-wc-postpay-gateway.php:128
     54#: includes/class-wc-postpay-gateway.php:150
    5255msgid "Postpay capture error."
    5356msgstr ""
    5457
    5558#. translators: %1$s: transaction id %2$s: order status
    56 #: includes/class-wc-postpay-gateway.php:144
     59#: includes/class-wc-postpay-gateway.php:166
    5760msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    5861msgstr ""
    5962
    60 #: includes/class-wc-postpay-gateway.php:150
     63#: includes/class-wc-postpay-gateway.php:172
    6164msgid "Postpay order cancelled."
    6265msgstr ""
    6366
    6467#. translators: %1$s: transaction id %2$s: error code
    65 #: includes/class-wc-postpay-gateway.php:173
     68#: includes/class-wc-postpay-gateway.php:196
    6669msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
     70msgstr ""
     71
     72#: includes/http/class-wc-postpay-adapter.php:66
     73msgid "Postpay is not properly configured."
    6774msgstr ""
    6875
     
    175182msgstr ""
    176183
    177 #: postpay.php:109
     184#: postpay.php:111
    178185msgid "Settings"
    179186msgstr ""
  • postpay/trunk/postpay.php

    r2267312 r2270251  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.1
     4 * Version: 0.1.2
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
     
    6262
    6363        $this->settings = get_option( 'woocommerce_' . self::PAYMENT_GATEWAY_ID . '_settings' );
    64         $this->enabled  = 'yes' === $this->settings['enabled'];
     64        $this->enabled  = 'yes' === $this->settings['enabled'] && ! empty( $this->settings['merchant_id'] );
    6565
    6666        if ( ! class_exists( '\\Postpay\\Postpay' ) ) {
  • postpay/trunk/readme.txt

    r2267312 r2270251  
    44Tested up to: 5.3.2
    55Requires PHP: 5.6
    6 Stable tag: 0.1.1
    7 Version: 0.1.1
     6Stable tag: 0.1.2
     7Version: 0.1.2
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7373== Changelog ==
    7474
     75= 0.1.2 - 2020-03-30 =
     76* Disabled module if merchantId is not defined
     77* Added is_available method to WC_Postpay_Gateway
     78* Returned WP_Error instance on refund errors
     79
    7580= 0.1.1 - 2020-03-25 =
    7681* Renamed plugin
  • postpay/trunk/vendor/autoload.php

    r2267104 r2270251  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83::getLoader();
     7return ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227::getLoader();
  • postpay/trunk/vendor/composer/autoload_real.php

    r2267104 r2270251  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83
     5class ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInita7bb61d5401fdd5778720c8c3ee5ae83', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit35361e866813e1f773c8bd2a5ec3d227', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
  • postpay/trunk/vendor/composer/autoload_static.php

    r2267104 r2270251  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83
     7class ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3232    {
    3333        return \Closure::bind(function () use ($loader) {
    34             $loader->prefixLengthsPsr4 = ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::$prefixLengthsPsr4;
    35             $loader->prefixDirsPsr4 = ComposerStaticInita7bb61d5401fdd5778720c8c3ee5ae83::$prefixDirsPsr4;
     34            $loader->prefixLengthsPsr4 = ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::$prefixLengthsPsr4;
     35            $loader->prefixDirsPsr4 = ComposerStaticInit35361e866813e1f773c8bd2a5ec3d227::$prefixDirsPsr4;
    3636
    3737        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.