WordPress.org

Plugin Directory

Changeset 1657554


Ignore:
Timestamp:
05/15/17 09:06:15 (6 months ago)
Author:
RistoNiinemets
Message:

version 1.3.1 (wc 3.0.x fixes)

Location:
estonian-banklinks-for-woocommerce
Files:
3 deleted
10 edited
24 copied

Legend:

Unmodified
Added
Removed
  • estonian-banklinks-for-woocommerce/trunk/estonian-banklinks-for-woocommerce.php

    r1645505 r1657554  
    44    Plugin URI: https://wordpress.org/plugins/estonian-banklinks-for-woocommerce/ 
    55    Description: Extends WooCommerce with most commonly used Estonian banklinks. 
    6     Version: 1.3.1 
     6    Version: 1.3.2 
    77    Author: Konekt OÜ 
    88    Author URI: https://www.konekt.ee 
     
    6565     */ 
    6666    public function includes() { 
     67        // Compatibility helpers 
     68        require_once WC_ESTONIAN_GATEWAYS_INCLUDES_PATH . '/compatibility-helpers.php'; 
     69 
    6770        // Abstract classes 
    6871        require_once WC_ESTONIAN_GATEWAYS_INCLUDES_PATH . '/abstracts/class-wc-banklink.php'; 
     
    100103     * 
    101104     * Allows overriding the offical translation by placing 
    102      * the translation files in wp-content/languages/woocommerce-estonian-banklinks 
     105     * the translation files in wp-content/languages/estonian-banklinks-for-woocommerce 
    103106     * 
    104107     * @return void 
     
    108111        $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 
    109112 
    110         load_textdomain( $domain, WP_LANG_DIR . '/woocommerce-estonian-banklinks/' . $domain . '-' . $locale . '.mo' ); 
     113        load_textdomain( $domain, WP_LANG_DIR . '/estonian-banklinks-for-woocommerce/' . $domain . '-' . $locale . '.mo' ); 
    111114        load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( WC_ESTONIAN_GATEWAYS_MAIN_FILE ) ) . '/languages/' ); 
    112115    } 
  • estonian-banklinks-for-woocommerce/trunk/includes/abstracts/class-wc-banklink-ipizza.php

    r1622939 r1657554  
    157157            // Payment completed 
    158158            $order->add_order_note( $this->get_title() . ': ' . __( 'Payment completed.', 'wc-gateway-estonia-banklink' ) ); 
    159             $order->payment_complete(); 
     159            $order->payment_complete( isset( $request['VK_T_NO'] ) ? $request['VK_T_NO'] : '' ); 
    160160        } 
    161161        else { 
     
    229229            'VK_VERSION'  => '008', 
    230230            'VK_SND_ID'   => $this->get_option( 'vk_snd_id' ), 
    231             'VK_STAMP'    => $order->id, 
     231            'VK_STAMP'    => wc_estonian_gateways_get_order_id( $order ), 
    232232            'VK_AMOUNT'   => round( $order->get_total(), 2 ), 
    233233            'VK_CURR'     => get_woocommerce_currency(), 
    234             'VK_REF'      => $this->generate_ref_num( $order->id ), 
    235             'VK_MSG'      => sprintf( __( 'Order nr. %s payment', 'wc-gateway-estonia-banklink' ), $order->id ), 
     234            'VK_REF'      => $this->generate_ref_num( wc_estonian_gateways_get_order_id( $order ) ), 
     235            'VK_MSG'      => sprintf( __( 'Order nr. %s payment', 'wc-gateway-estonia-banklink' ), wc_estonian_gateways_get_order_id( $order ) ), 
    236236            'VK_RETURN'   => $this->notify_url, 
    237237            'VK_CANCEL'   => $this->notify_url, 
  • estonian-banklinks-for-woocommerce/trunk/includes/abstracts/class-wc-banklink-solo.php

    r1358640 r1657554  
    8585        $macFields      = array( 
    8686            'SOLOPMT_VERSION'       => '0003', 
    87             'SOLOPMT_STAMP'         => $order->id, 
     87            'SOLOPMT_STAMP'         => wc_estonian_gateways_get_order_id( $order ), 
    8888            'SOLOPMT_RCV_ID'        => $this->get_option( 'solopmt_rcv_id' ), 
    8989            'SOLOPMT_RCV_ACCOUNT'   => $this->get_option( 'solopmt_rcv_account' ), 
    9090            'SOLOPMT_LANGUAGE'      => $this->get_option( 'solopmt_language' ), 
    9191            'SOLOPMT_AMOUNT'        => round( $order->get_total(), 2 ), 
    92             'SOLOPMT_REF'           => $this->generate_ref_num( $order->id ), 
     92            'SOLOPMT_REF'           => $this->generate_ref_num( wc_estonian_gateways_get_order_id( $order ) ), 
    9393            'SOLOPMT_DATE'          => 'EXPRESS', 
    94             'SOLOPMT_MSG'           => sprintf( __( 'Order nr. %s payment', 'wc-gateway-estonia-banklink' ), $order->id ), 
     94            'SOLOPMT_MSG'           => sprintf( __( 'Order nr. %s payment', 'wc-gateway-estonia-banklink' ), wc_estonian_gateways_get_order_id( $order ) ), 
    9595            'SOLOPMT_RETURN'        => $this->notify_url, 
    9696            'SOLOPMT_CANCEL'        => $this->notify_url, 
     
    153153        $order  = wc_get_order( $request['SOLOPMT_RETURN_STAMP'] ); 
    154154 
     155        $this->debug( $request ); 
     156 
    155157        // Check validation 
    156158        if ( isset( $validationResult['payment'] ) && $validationResult['payment'] == 'success' ) { 
    157159            // Payment completed 
    158             $order->add_order_note( $this->title . ': ' . __( 'Payment completed.', 'wc-gateway-estonia-banklink' ) ); 
     160            $order->add_order_note( $this->get_title() . ': ' . __( 'Payment completed.', 'wc-gateway-estonia-banklink' ) ); 
    159161            $order->payment_complete(); 
    160162        } 
    161163        else { 
    162164            // Set status to failed 
    163             $order->update_status( 'failed', $this->title . ': ' . __( 'Payment not made or is not verified.', 'wc-gateway-estonia-banklink' ) ); 
     165            $order->update_status( 'failed', $this->get_title() . ': ' . __( 'Payment not made or is not verified.', 'wc-gateway-estonia-banklink' ) ); 
    164166        } 
    165167 
    166168        // Redirect to order details 
    167169        wp_redirect( $this->get_return_url( $order ) ); 
     170        exit; 
    168171    } 
    169172 
     
    228231        $keyvers        = $this->get_option( 'solopmt_keyvers' ); 
    229232        $mac            = $this->get_option( 'solopmt_mac' ); 
    230         $data           .= $mac."&"; 
     233        $data           .= $mac . '&'; 
    231234 
    232235        // Encrypt data 
  • estonian-banklinks-for-woocommerce/trunk/includes/abstracts/class-wc-banklink.php

    r1645505 r1657554  
    144144        } 
    145145 
    146         // Get customer country based on WooCommerce version 
    147         if( version_compare( WC_VERSION, '3.0', '>' ) ) { 
    148             $customer_country = WC()->customer->get_billing_country(); 
    149             $this->debug( 'a' ); 
    150         } 
    151         else { 
    152             $customer_country = WC()->customer->get_country(); 
    153             $this->debug( 'b' ); 
    154         } 
    155  
    156         return $this->get_option( 'enabled', 'no' ) != 'no' && array_intersect( array( 'all', $customer_country ), $this->get_option( 'countries' ) ); 
     146        return $this->get_option( 'enabled', 'no' ) != 'no' && array_intersect( array( 'all', wc_estonian_gateways_get_customer_billing_country() ), $this->get_option( 'countries' ) ); 
    157147    } 
    158148 
     
    181171        if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG === TRUE ) { 
    182172            $logger = new WC_Logger(); 
    183             $logger->add( $this->id, is_array( $data ) || is_object( $data ) ? print_r( $data, TRUE ) : $data ); 
     173            $logger->add( $this->id, is_array( $data ) || is_object( $data ) ? print_r( $data, TRUE ) : var_export( $data, true ) ); 
    184174        } 
    185175    } 
  • estonian-banklinks-for-woocommerce/trunk/includes/gateways/class-wc-banklink-estcard-gateway.php

    r1358640 r1657554  
    8888            'ver'          => '004', 
    8989            'id'           => $this->get_option( 'merchant_id' ), 
    90             'ecuno'        => $this->generate_unique_ecuno( $order->id ), 
     90            'ecuno'        => $this->generate_unique_ecuno( wc_estonian_gateways_get_order_id( $order ) ), 
    9191            'eamount'      => ( round( $order->get_total(), 2 ) * 100 ), 
    9292            'cur'          => get_woocommerce_currency(), 
  • estonian-banklinks-for-woocommerce/trunk/includes/gateways/class-wc-banklink-maksekeskus-redirect-gateway.php

    r1378718 r1657554  
    8282            'shop'      => $this->get_option( 'shop_id' ), 
    8383            'amount'    => round( $order->get_total(), 2 ), 
    84             'reference' => $order->id, 
     84            'reference' => wc_estonian_gateways_get_order_id( $order ), 
    8585            'country'   => $order->billing_country, 
    8686            'locale'    => $this->get_option( 'locale' ) 
  • estonian-banklinks-for-woocommerce/trunk/languages/wc-gateway-estonia-banklink-et.po

    r1622939 r1657554  
    22msgstr "" 
    33"Project-Id-Version: Estonian Banklinks for WooCommerce\n" 
    4 "POT-Creation-Date: 2017-03-27 16:13+0300\n" 
    5 "PO-Revision-Date: 2017-03-27 16:14+0300\n" 
     4"POT-Creation-Date: 2017-05-15 11:44+0300\n" 
     5"PO-Revision-Date: 2017-05-15 11:44+0300\n" 
    66"Last-Translator: Risto Niinemets <risto@konekt.ee>\n" 
    77"Language-Team: Konekt OÜ <info@konekt.ee>\n" 
     
    1010"Content-Type: text/plain; charset=UTF-8\n" 
    1111"Content-Transfer-Encoding: 8bit\n" 
    12 "X-Generator: Poedit 1.8.12\n" 
     12"X-Generator: Poedit 2.0.2\n" 
    1313"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" 
    1414"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" 
  • estonian-banklinks-for-woocommerce/trunk/languages/wc-gateway-estonia-banklink.pot

    r1622939 r1657554  
    33msgstr "" 
    44"Project-Id-Version: Estonian Banklinks for WooCommerce\n" 
    5 "POT-Creation-Date: 2017-03-27 16:13+0300\n" 
     5"POT-Creation-Date: 2017-05-15 11:44+0300\n" 
    66"PO-Revision-Date: 2015-09-30 21:23+0200\n" 
    77"Last-Translator: Risto Niinemets <risto@konekt.ee>\n" 
     
    1111"Content-Type: text/plain; charset=UTF-8\n" 
    1212"Content-Transfer-Encoding: 8bit\n" 
    13 "X-Generator: Poedit 1.8.12\n" 
     13"X-Generator: Poedit 2.0.2\n" 
    1414"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" 
    1515"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" 
  • estonian-banklinks-for-woocommerce/trunk/readme.txt

    r1645505 r1657554  
    44Requires at least: 4.1 
    55Tested up to: 4.7.4 
    6 Stable tag: 1.3.1 
     6Stable tag: 1.3.2 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    3838== Changelog == 
    3939 
     40= 1.3.2 = 
     41* Fix: Order ID and such should not be accessed directly with WooCommerce 3.0.x. Compatibility fix. 
     42* Save transaction ID with iPizza protocol 
     43 
    4044= 1.3.1 = 
    4145* Compability with WooCommerce 3.0.x 
Note: See TracChangeset for help on using the changeset viewer.