WordPress.org

Plugin Directory

Changeset 1547499


Ignore:
Timestamp:
12/07/16 15:38:25 (5 months ago)
Author:
shivapoudel
Message:

Release 1.5.0, see readme.txt for the changelog.

Location:
woocommerce-esewa
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woocommerce-esewa/tags/1.5.0/includes/class-wc-esewa-gateway.php

    r1318975 r1547499  
    2121class WC_Gateway_eSewa extends WC_Payment_Gateway { 
    2222 
    23     /** @var boolean Whether or not logging is enabled */ 
     23    /** @var bool Whether or not logging is enabled */ 
    2424    public static $log_enabled = false; 
    2525 
     
    3636        $this->order_button_text  = __( 'Proceed to eSewa', 'woocommerce-esewa' ); 
    3737        $this->method_title       = __( 'eSewa', 'woocommerce-esewa' ); 
    38         $this->method_description = sprintf( __( 'The eSewa epay system sends customers to eSewa to enter their payment information. The eSewa IPN requires fsockopen/cURL support to update order statuses after payment. Check the %ssystem status%s page for more details.', 'woocommerce-esewa' ), '<a href="' . admin_url( 'admin.php?page=wc-status' ) . '">', '</a>' ); 
     38        $this->method_description = sprintf( __( 'The eSewa epay system sends customers to eSewa to enter their payment information. The eSewa IPN requires fsockopen/cURL support to update order statuses after payment. Check the %1$ssystem status%2$s page for more details.', 'woocommerce-esewa' ), '<a href="' . admin_url( 'admin.php?page=wc-status' ) . '">', '</a>' ); 
    3939 
    4040        // Load the settings. 
     
    5555        if ( ! $this->is_valid_for_use() ) { 
    5656            $this->enabled = 'no'; 
    57         } else if ( $this->service_code ) { 
    58             include_once( 'includes/class-wc-gateway-esewa-ipn-handler.php' ); 
     57        } elseif ( $this->service_code ) { 
     58            include_once( dirname( __FILE__ ) . '/includes/class-wc-gateway-esewa-ipn-handler.php' ); 
    5959            new WC_Gateway_eSewa_IPN_Handler( $this, $this->testmode, $this->service_code ); 
    6060        } 
     
    6868        if ( self::$log_enabled ) { 
    6969            if ( empty( self::$log ) ) { 
    70                 self::$log = new WC_Logger(); 
     70                if ( version_compare( WC_VERSION, '2.7', '>=' ) ) { 
     71                    self::$log = wc_get_logger(); 
     72                } else { 
     73                    self::$log = new WC_Logger(); 
     74                } 
    7175            } 
    7276            self::$log->add( 'esewa', $message ); 
     
    127131     */ 
    128132    public function process_payment( $order_id ) { 
    129         include_once( 'includes/class-wc-gateway-esewa-request.php' ); 
     133        include_once( dirname( __FILE__ ) . '/includes/class-wc-gateway-esewa-request.php' ); 
    130134 
    131135        $order         = wc_get_order( $order_id ); 
     
    134138        return array( 
    135139            'result'   => 'success', 
    136             'redirect' => $esewa_request->get_request_url( $order, $this->testmode ) 
     140            'redirect' => $esewa_request->get_request_url( $order, $this->testmode ), 
    137141        ); 
    138142    } 
  • woocommerce-esewa/tags/1.5.0/includes/includes/class-wc-gateway-esewa-ipn-handler.php

    r1317458 r1547499  
    55} 
    66 
    7 include_once( 'class-wc-gateway-esewa-response.php' ); 
     7include_once( dirname( __FILE__ ) . '/class-wc-gateway-esewa-response.php' ); 
    88 
    99/** 
     
    1818     * Constructor. 
    1919     * @param WC_Gateway_eSewa $gateway 
     20     * @param bool             $sandbox 
     21     * @param string           $service_code 
    2022     */ 
    2123    public function __construct( $gateway, $sandbox = false, $service_code = '' ) { 
     
    8890                'pid'  => $order_id, 
    8991                'rid'  => $transaction, 
    90                 'scd'  => $this->service_code 
     92                'scd'  => $this->service_code, 
    9193            ), 
    9294            'timeout'     => 60, 
     
    9597            'compress'    => false, 
    9698            'decompress'  => false, 
    97             'user-agent'  => 'WooCommerce/' . WC()->version 
     99            'user-agent'  => 'WooCommerce/' . WC()->version, 
    98100        ); 
    99101 
     
    122124     * Check payment amount from IPN matches the order. 
    123125     * @param WC_Order $order 
     126     * @param int      $amount 
    124127     */ 
    125128    protected function validate_amount( $order, $amount ) { 
     
    136139     * Handle a completed payment. 
    137140     * @param WC_Order $order 
     141     * @param array    $requested 
    138142     */ 
    139143    protected function payment_status_completed( $order, $requested ) { 
     
    155159     * Handle a failed payment. 
    156160     * @param WC_Order $order 
     161     * @param array    $requested 
    157162     */ 
    158163    protected function payment_status_failed( $order, $requested ) { 
  • woocommerce-esewa/tags/1.5.0/includes/includes/class-wc-gateway-esewa-request.php

    r1317458 r1547499  
    3434     * Get the eSewa request URL for an order. 
    3535     * @param  WC_Order $order 
    36      * @param  boolean  $sandbox 
     36     * @param  bool     $sandbox 
    3737     * @return string 
    3838     */ 
    3939    public function get_request_url( $order, $sandbox = false ) { 
    4040        $esewa_args = http_build_query( $this->get_esewa_args( $order ), '', '&' ); 
     41 
     42        WC_Gateway_eSewa::log( 'eSewa Request Args for order ' . $order->get_order_number() . ': ' . print_r( $paypal_args, true ) ); 
    4143 
    4244        if ( $sandbox ) { 
  • woocommerce-esewa/tags/1.5.0/includes/includes/settings-esewa.php

    r1317458 r1547499  
    1313        'type'    => 'checkbox', 
    1414        'label'   => __( 'Enable eSewa Payment', 'woocommerce-esewa' ), 
    15         'default' => 'yes' 
     15        'default' => 'yes', 
    1616    ), 
    1717    'title' => array( 
     
    2020        'desc_tip'    => true, 
    2121        'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-esewa' ), 
    22         'default'     => __( 'eSewa', 'woocommerce-esewa' ) 
     22        'default'     => __( 'eSewa', 'woocommerce-esewa' ), 
    2323    ), 
    2424    'description' => array( 
     
    2727        'desc_tip'    => true, 
    2828        'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-esewa' ), 
    29         'default'     => __( 'Pay via eSewa; you can pay with eSewa account securely.', 'woocommerce-esewa' ) 
     29        'default'     => __( 'Pay via eSewa; you can pay with eSewa account securely.', 'woocommerce-esewa' ), 
    3030    ), 
    3131    'service_code' => array( 
    32         'title'       => __( 'Service Code', 'woocommerce-esewa' ), 
     32        'title'       => __( 'Service code', 'woocommerce-esewa' ), 
    3333        'type'        => 'text', 
    3434        'desc_tip'    => true, 
    3535        'description' => __( 'Please enter your eSewa Service Code; this is needed in order to take payment.', 'woocommerce-esewa' ), 
    3636        'default'     => '', 
    37         'placeholder' => 'Eg: Woo' 
     37        'placeholder' => 'Eg: Woo', 
    3838    ), 
    3939    'invoice_prefix' => array( 
    40         'title'       => __( 'Invoice Prefix', 'woocommerce-esewa' ), 
     40        'title'       => __( 'Invoice prefix', 'woocommerce-esewa' ), 
    4141        'type'        => 'text', 
    4242        'desc_tip'    => true, 
    4343        'description' => __( 'Please enter a prefix for your invoice numbers. If you use your eSewa account for multiple stores ensure this prefix is unique as eSewa will not allow orders with the same invoice number.', 'woocommerce-esewa' ), 
    44         'default'     => 'WC-' 
     44        'default'     => 'WC-', 
    4545    ), 
    4646    'testmode' => array( 
    47         'title'       => __( 'Sandbox Mode', 'woocommerce-esewa' ), 
     47        'title'       => __( 'Sandbox mode', 'woocommerce-esewa' ), 
    4848        'type'        => 'checkbox', 
    4949        'label'       => __( 'Enable Sandbox Mode', 'woocommerce-esewa' ), 
    5050        'default'     => 'no', 
    51         'description' => sprintf( __( 'Enable eSewa sandbox to test payments. Sign up for a developer account %shere%s.', 'woocommerce-esewa' ), '<a href="https://dev.esewa.com.np/" target="_blank">', '</a>' ) 
     51        'description' => sprintf( __( 'Enable eSewa sandbox to test payments. Sign up for a developer account %1$shere%2$s.', 'woocommerce-esewa' ), '<a href="https://dev.esewa.com.np/" target="_blank">', '</a>' ), 
    5252    ), 
    5353    'debug' => array( 
    54         'title'       => __( 'Debug Log', 'woocommerce-esewa' ), 
     54        'title'       => __( 'Debug log', 'woocommerce-esewa' ), 
    5555        'type'        => 'checkbox', 
    5656        'label'       => __( 'Enable logging', 'woocommerce-esewa' ), 
    5757        'default'     => 'no', 
    58         'description' => sprintf( __( 'Log eSewa events, such as IPN requests, inside <code>%s</code>', 'woocommerce-esewa' ), wc_get_log_file_path( 'esewa' ) ) 
    59     ) 
     58        'description' => sprintf( __( 'Log eSewa events, such as IPN requests, inside <code>%s</code>', 'woocommerce-esewa' ), wc_get_log_file_path( 'esewa' ) ), 
     59    ), 
    6060); 
  • woocommerce-esewa/tags/1.5.0/languages/woocommerce-esewa.pot

    r1318975 r1547499  
    1 # Copyright (C) 2015 AxisThemes 
     1# Copyright (C) 2016 AxisThemes 
    22# This file is distributed under the GPLv3 or later. 
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: WooCommerce eSewa 1.4.0\n" 
     5"Project-Id-Version: WooCommerce eSewa 1.5.0\n" 
    66"Report-Msgid-Bugs-To: " 
    77"https://github.com/axisthemes/woocommerce-esewa/issues\n" 
    8 "POT-Creation-Date: 2015-12-29 18:43:41+00:00\n" 
     8"POT-Creation-Date: 2016-12-07 15:33:21+00:00\n" 
    99"MIME-Version: 1.0\n" 
    1010"Content-Type: text/plain; charset=utf-8\n" 
    1111"Content-Transfer-Encoding: 8bit\n" 
    12 "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" 
     12"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
    1414"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" 
    15 "X-Generator: grunt-wp-i18n 0.5.3\n" 
     15"X-Generator: grunt-wp-i18n 0.5.4\n" 
    1616 
    1717#: includes/class-wc-esewa-gateway.php:36 
     
    2828"The eSewa epay system sends customers to eSewa to enter their payment " 
    2929"information. The eSewa IPN requires fsockopen/cURL support to update order " 
    30 "statuses after payment. Check the %ssystem status%s page for more details." 
     30"statuses after payment. Check the %1$ssystem status%2$s page for more " 
     31"details." 
    3132msgstr "" 
    3233 
    33 #: includes/class-wc-esewa-gateway.php:95 
     34#: includes/class-wc-esewa-gateway.php:99 
    3435msgid "Gateway Disabled" 
    3536msgstr "" 
    3637 
    37 #: includes/class-wc-esewa-gateway.php:95 
     38#: includes/class-wc-esewa-gateway.php:99 
    3839msgid "eSewa does not support your store currency." 
    3940msgstr "" 
    4041 
    41 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:59 
     42#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:61 
    4243msgid "eSewa IPN response failed." 
    4344msgstr "" 
    4445 
    45 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:130 
     46#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:133 
    4647msgid "Validation error: eSewa amounts do not match (gross %s)." 
    4748msgstr "" 
    4849 
    49 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:148 
     50#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:152 
    5051msgid "IPN payment completed" 
    5152msgstr "" 
    5253 
    53 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:150 
     54#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:154 
    5455msgid "Payment pending: %s" 
    5556msgstr "" 
    5657 
    57 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:159 
     58#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:164 
    5859msgid "Payment %s via IPN." 
    5960msgstr "" 
     
    8889 
    8990#: includes/includes/settings-esewa.php:32 
    90 msgid "Service Code" 
     91msgid "Service code" 
    9192msgstr "" 
    9293 
     
    9899 
    99100#: includes/includes/settings-esewa.php:40 
    100 msgid "Invoice Prefix" 
     101msgid "Invoice prefix" 
    101102msgstr "" 
    102103 
     
    109110 
    110111#: includes/includes/settings-esewa.php:47 
    111 msgid "Sandbox Mode" 
     112msgid "Sandbox mode" 
    112113msgstr "" 
    113114 
     
    119120msgid "" 
    120121"Enable eSewa sandbox to test payments. Sign up for a developer account " 
    121 "%shere%s." 
     122"%1$shere%2$s." 
    122123msgstr "" 
    123124 
    124125#: includes/includes/settings-esewa.php:54 
    125 msgid "Debug Log" 
     126msgid "Debug log" 
    126127msgstr "" 
    127128 
     
    135136 
    136137#: woocommerce-esewa.php:109 
    137 msgid "View Settings" 
     138msgid "View settings" 
    138139msgstr "" 
    139140 
  • woocommerce-esewa/tags/1.5.0/readme.txt

    r1318975 r1547499  
    33Tags: woocommerce, esewa 
    44Requires at least: 4.0 
    5 Tested up to: 4.4 
    6 Stable tag: 1.4.0 
     5Tested up to: 4.7 
     6Stable tag: 1.5.0 
    77License: GPLv3 or later 
    8 License URI: http://www.gnu.org/licenses/gpl-3.0.html 
     8License URI: https://www.gnu.org/licenses/gpl-3.0.html 
    99 
    1010Adds eSewa as payment gateway in WooCommerce plugin. 
     
    1616This plugin adds eSewa gateway to WooCommerce. 
    1717 
    18 Please notice that [WooCommerce](http://wordpress.org/plugins/woocommerce/) must be installed and active. 
     18Please notice that [WooCommerce](https://wordpress.org/plugins/woocommerce/) must be installed and active. 
    1919 
    2020= Introduction = 
     
    2828= Installation = 
    2929 
    30 Check out our installation guide and configuration of WooCommerce eSewa tab [Installation](http://wordpress.org/extend/plugins/woocommerce-esewa/installation/). 
     30Check out our installation guide and configuration of WooCommerce eSewa tab [Installation](https://wordpress.org/plugins/woocommerce-esewa/installation/). 
    3131 
    3232= Questions? = 
     
    3434You can answer your questions using: 
    3535 
    36 * Our Session [FAQ](http://wordpress.org/extend/plugins/woocommerce-esewa/faq/). 
    37 * Creating a topic in the [WordPress support forum](http://wordpress.org/support/plugin/woocommerce-esewa) (English only). 
     36* Our Session [FAQ](https://wordpress.org/plugins/woocommerce-esewa/faq/). 
     37* Creating a topic in the [WordPress support forum](https://wordpress.org/support/plugin/woocommerce-esewa) (English only). 
    3838 
    3939= Contribute = 
     
    107107== Changelog == 
    108108 
     109= 1.5.0 = 
     110* Fix - Plugins action settings link. 
     111* Tweak - More logging for request args. 
     112* Tweak - Define full path for includes. 
     113* Tweak - Add support for WC_Logger pluggable via wc_get_logger function. 
     114 
    109115= 1.4.0 = 
    110116* Deprecated - PDT Check as IPN is sufficient for processing order. 
  • woocommerce-esewa/tags/1.5.0/woocommerce-esewa.php

    r1318975 r1547499  
    44 * Plugin URI: https://github.com/axisthemes/woocommerce-esewa 
    55 * Description: WooCommerce eSewa is a Nepali payment gateway for WooCommerce. 
    6  * Version: 1.4.0 
     6 * Version: 1.5.0 
    77 * Author: AxisThemes 
    88 * Author URI: http://axisthemes.com 
     
    2727     * @var string 
    2828     */ 
    29     const VERSION = '1.4.0'; 
     29    const VERSION = '1.5.0'; 
    3030 
    3131    /** 
     
    4848            // Hooks. 
    4949            add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) ); 
    50             add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( __CLASS__, 'plugin_action_links' ) ); 
     50            add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) ); 
    5151        } else { 
    5252            add_action( 'admin_notices', array( $this, 'woocommerce_missing_notice' ) ); 
     
    8686     */ 
    8787    private function includes() { 
    88         include_once( 'includes/class-wc-esewa-gateway.php' ); 
     88        include_once( dirname( __FILE__ ) . '/includes/class-wc-esewa-gateway.php' ); 
    8989    } 
    9090 
     
    101101 
    102102    /** 
    103      * Show action links on the plugin screen. 
    104      * @param  mixed $links Plugin Action links. 
     103     * Display action links in the Plugins list table. 
     104     * @param  array $actions 
    105105     * @return array 
    106106     */ 
    107     public static function plugin_action_links( $links ) { 
    108         $action_links = array( 
    109             'settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=wc_gateway_esewa' ) . '" title="' . esc_attr( __( 'View Settings', 'woocommerce-esewa' ) ) . '">' . __( 'Settings', 'woocommerce-esewa' ) . '</a>', 
     107    public function plugin_action_links( $actions ) { 
     108        $new_actions = array( 
     109            'settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=esewa' ) . '" title="' . esc_attr( __( 'View settings', 'woocommerce-esewa' ) ) . '">' . __( 'Settings', 'woocommerce-esewa' ) . '</a>', 
    110110        ); 
    111111 
    112         return array_merge( $action_links, $links ); 
     112        return array_merge( $new_actions, $actions ); 
    113113    } 
    114114 
     
    122122} 
    123123 
    124 add_action( 'plugins_loaded', array( 'WC_eSewa', 'get_instance' ), 0 ); 
     124add_action( 'plugins_loaded', array( 'WC_eSewa', 'get_instance' ) ); 
    125125 
    126126endif; 
  • woocommerce-esewa/trunk/includes/class-wc-esewa-gateway.php

    r1318975 r1547499  
    2121class WC_Gateway_eSewa extends WC_Payment_Gateway { 
    2222 
    23     /** @var boolean Whether or not logging is enabled */ 
     23    /** @var bool Whether or not logging is enabled */ 
    2424    public static $log_enabled = false; 
    2525 
     
    3636        $this->order_button_text  = __( 'Proceed to eSewa', 'woocommerce-esewa' ); 
    3737        $this->method_title       = __( 'eSewa', 'woocommerce-esewa' ); 
    38         $this->method_description = sprintf( __( 'The eSewa epay system sends customers to eSewa to enter their payment information. The eSewa IPN requires fsockopen/cURL support to update order statuses after payment. Check the %ssystem status%s page for more details.', 'woocommerce-esewa' ), '<a href="' . admin_url( 'admin.php?page=wc-status' ) . '">', '</a>' ); 
     38        $this->method_description = sprintf( __( 'The eSewa epay system sends customers to eSewa to enter their payment information. The eSewa IPN requires fsockopen/cURL support to update order statuses after payment. Check the %1$ssystem status%2$s page for more details.', 'woocommerce-esewa' ), '<a href="' . admin_url( 'admin.php?page=wc-status' ) . '">', '</a>' ); 
    3939 
    4040        // Load the settings. 
     
    5555        if ( ! $this->is_valid_for_use() ) { 
    5656            $this->enabled = 'no'; 
    57         } else if ( $this->service_code ) { 
    58             include_once( 'includes/class-wc-gateway-esewa-ipn-handler.php' ); 
     57        } elseif ( $this->service_code ) { 
     58            include_once( dirname( __FILE__ ) . '/includes/class-wc-gateway-esewa-ipn-handler.php' ); 
    5959            new WC_Gateway_eSewa_IPN_Handler( $this, $this->testmode, $this->service_code ); 
    6060        } 
     
    6868        if ( self::$log_enabled ) { 
    6969            if ( empty( self::$log ) ) { 
    70                 self::$log = new WC_Logger(); 
     70                if ( version_compare( WC_VERSION, '2.7', '>=' ) ) { 
     71                    self::$log = wc_get_logger(); 
     72                } else { 
     73                    self::$log = new WC_Logger(); 
     74                } 
    7175            } 
    7276            self::$log->add( 'esewa', $message ); 
     
    127131     */ 
    128132    public function process_payment( $order_id ) { 
    129         include_once( 'includes/class-wc-gateway-esewa-request.php' ); 
     133        include_once( dirname( __FILE__ ) . '/includes/class-wc-gateway-esewa-request.php' ); 
    130134 
    131135        $order         = wc_get_order( $order_id ); 
     
    134138        return array( 
    135139            'result'   => 'success', 
    136             'redirect' => $esewa_request->get_request_url( $order, $this->testmode ) 
     140            'redirect' => $esewa_request->get_request_url( $order, $this->testmode ), 
    137141        ); 
    138142    } 
  • woocommerce-esewa/trunk/includes/includes/class-wc-gateway-esewa-ipn-handler.php

    r1317458 r1547499  
    55} 
    66 
    7 include_once( 'class-wc-gateway-esewa-response.php' ); 
     7include_once( dirname( __FILE__ ) . '/class-wc-gateway-esewa-response.php' ); 
    88 
    99/** 
     
    1818     * Constructor. 
    1919     * @param WC_Gateway_eSewa $gateway 
     20     * @param bool             $sandbox 
     21     * @param string           $service_code 
    2022     */ 
    2123    public function __construct( $gateway, $sandbox = false, $service_code = '' ) { 
     
    8890                'pid'  => $order_id, 
    8991                'rid'  => $transaction, 
    90                 'scd'  => $this->service_code 
     92                'scd'  => $this->service_code, 
    9193            ), 
    9294            'timeout'     => 60, 
     
    9597            'compress'    => false, 
    9698            'decompress'  => false, 
    97             'user-agent'  => 'WooCommerce/' . WC()->version 
     99            'user-agent'  => 'WooCommerce/' . WC()->version, 
    98100        ); 
    99101 
     
    122124     * Check payment amount from IPN matches the order. 
    123125     * @param WC_Order $order 
     126     * @param int      $amount 
    124127     */ 
    125128    protected function validate_amount( $order, $amount ) { 
     
    136139     * Handle a completed payment. 
    137140     * @param WC_Order $order 
     141     * @param array    $requested 
    138142     */ 
    139143    protected function payment_status_completed( $order, $requested ) { 
     
    155159     * Handle a failed payment. 
    156160     * @param WC_Order $order 
     161     * @param array    $requested 
    157162     */ 
    158163    protected function payment_status_failed( $order, $requested ) { 
  • woocommerce-esewa/trunk/includes/includes/class-wc-gateway-esewa-request.php

    r1317458 r1547499  
    3434     * Get the eSewa request URL for an order. 
    3535     * @param  WC_Order $order 
    36      * @param  boolean  $sandbox 
     36     * @param  bool     $sandbox 
    3737     * @return string 
    3838     */ 
    3939    public function get_request_url( $order, $sandbox = false ) { 
    4040        $esewa_args = http_build_query( $this->get_esewa_args( $order ), '', '&' ); 
     41 
     42        WC_Gateway_eSewa::log( 'eSewa Request Args for order ' . $order->get_order_number() . ': ' . print_r( $paypal_args, true ) ); 
    4143 
    4244        if ( $sandbox ) { 
  • woocommerce-esewa/trunk/includes/includes/settings-esewa.php

    r1317458 r1547499  
    1313        'type'    => 'checkbox', 
    1414        'label'   => __( 'Enable eSewa Payment', 'woocommerce-esewa' ), 
    15         'default' => 'yes' 
     15        'default' => 'yes', 
    1616    ), 
    1717    'title' => array( 
     
    2020        'desc_tip'    => true, 
    2121        'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-esewa' ), 
    22         'default'     => __( 'eSewa', 'woocommerce-esewa' ) 
     22        'default'     => __( 'eSewa', 'woocommerce-esewa' ), 
    2323    ), 
    2424    'description' => array( 
     
    2727        'desc_tip'    => true, 
    2828        'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-esewa' ), 
    29         'default'     => __( 'Pay via eSewa; you can pay with eSewa account securely.', 'woocommerce-esewa' ) 
     29        'default'     => __( 'Pay via eSewa; you can pay with eSewa account securely.', 'woocommerce-esewa' ), 
    3030    ), 
    3131    'service_code' => array( 
    32         'title'       => __( 'Service Code', 'woocommerce-esewa' ), 
     32        'title'       => __( 'Service code', 'woocommerce-esewa' ), 
    3333        'type'        => 'text', 
    3434        'desc_tip'    => true, 
    3535        'description' => __( 'Please enter your eSewa Service Code; this is needed in order to take payment.', 'woocommerce-esewa' ), 
    3636        'default'     => '', 
    37         'placeholder' => 'Eg: Woo' 
     37        'placeholder' => 'Eg: Woo', 
    3838    ), 
    3939    'invoice_prefix' => array( 
    40         'title'       => __( 'Invoice Prefix', 'woocommerce-esewa' ), 
     40        'title'       => __( 'Invoice prefix', 'woocommerce-esewa' ), 
    4141        'type'        => 'text', 
    4242        'desc_tip'    => true, 
    4343        'description' => __( 'Please enter a prefix for your invoice numbers. If you use your eSewa account for multiple stores ensure this prefix is unique as eSewa will not allow orders with the same invoice number.', 'woocommerce-esewa' ), 
    44         'default'     => 'WC-' 
     44        'default'     => 'WC-', 
    4545    ), 
    4646    'testmode' => array( 
    47         'title'       => __( 'Sandbox Mode', 'woocommerce-esewa' ), 
     47        'title'       => __( 'Sandbox mode', 'woocommerce-esewa' ), 
    4848        'type'        => 'checkbox', 
    4949        'label'       => __( 'Enable Sandbox Mode', 'woocommerce-esewa' ), 
    5050        'default'     => 'no', 
    51         'description' => sprintf( __( 'Enable eSewa sandbox to test payments. Sign up for a developer account %shere%s.', 'woocommerce-esewa' ), '<a href="https://dev.esewa.com.np/" target="_blank">', '</a>' ) 
     51        'description' => sprintf( __( 'Enable eSewa sandbox to test payments. Sign up for a developer account %1$shere%2$s.', 'woocommerce-esewa' ), '<a href="https://dev.esewa.com.np/" target="_blank">', '</a>' ), 
    5252    ), 
    5353    'debug' => array( 
    54         'title'       => __( 'Debug Log', 'woocommerce-esewa' ), 
     54        'title'       => __( 'Debug log', 'woocommerce-esewa' ), 
    5555        'type'        => 'checkbox', 
    5656        'label'       => __( 'Enable logging', 'woocommerce-esewa' ), 
    5757        'default'     => 'no', 
    58         'description' => sprintf( __( 'Log eSewa events, such as IPN requests, inside <code>%s</code>', 'woocommerce-esewa' ), wc_get_log_file_path( 'esewa' ) ) 
    59     ) 
     58        'description' => sprintf( __( 'Log eSewa events, such as IPN requests, inside <code>%s</code>', 'woocommerce-esewa' ), wc_get_log_file_path( 'esewa' ) ), 
     59    ), 
    6060); 
  • woocommerce-esewa/trunk/languages/woocommerce-esewa.pot

    r1318975 r1547499  
    1 # Copyright (C) 2015 AxisThemes 
     1# Copyright (C) 2016 AxisThemes 
    22# This file is distributed under the GPLv3 or later. 
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: WooCommerce eSewa 1.4.0\n" 
     5"Project-Id-Version: WooCommerce eSewa 1.5.0\n" 
    66"Report-Msgid-Bugs-To: " 
    77"https://github.com/axisthemes/woocommerce-esewa/issues\n" 
    8 "POT-Creation-Date: 2015-12-29 18:43:41+00:00\n" 
     8"POT-Creation-Date: 2016-12-07 15:33:21+00:00\n" 
    99"MIME-Version: 1.0\n" 
    1010"Content-Type: text/plain; charset=utf-8\n" 
    1111"Content-Transfer-Encoding: 8bit\n" 
    12 "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" 
     12"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
    1414"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" 
    15 "X-Generator: grunt-wp-i18n 0.5.3\n" 
     15"X-Generator: grunt-wp-i18n 0.5.4\n" 
    1616 
    1717#: includes/class-wc-esewa-gateway.php:36 
     
    2828"The eSewa epay system sends customers to eSewa to enter their payment " 
    2929"information. The eSewa IPN requires fsockopen/cURL support to update order " 
    30 "statuses after payment. Check the %ssystem status%s page for more details." 
     30"statuses after payment. Check the %1$ssystem status%2$s page for more " 
     31"details." 
    3132msgstr "" 
    3233 
    33 #: includes/class-wc-esewa-gateway.php:95 
     34#: includes/class-wc-esewa-gateway.php:99 
    3435msgid "Gateway Disabled" 
    3536msgstr "" 
    3637 
    37 #: includes/class-wc-esewa-gateway.php:95 
     38#: includes/class-wc-esewa-gateway.php:99 
    3839msgid "eSewa does not support your store currency." 
    3940msgstr "" 
    4041 
    41 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:59 
     42#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:61 
    4243msgid "eSewa IPN response failed." 
    4344msgstr "" 
    4445 
    45 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:130 
     46#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:133 
    4647msgid "Validation error: eSewa amounts do not match (gross %s)." 
    4748msgstr "" 
    4849 
    49 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:148 
     50#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:152 
    5051msgid "IPN payment completed" 
    5152msgstr "" 
    5253 
    53 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:150 
     54#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:154 
    5455msgid "Payment pending: %s" 
    5556msgstr "" 
    5657 
    57 #: includes/includes/class-wc-gateway-esewa-ipn-handler.php:159 
     58#: includes/includes/class-wc-gateway-esewa-ipn-handler.php:164 
    5859msgid "Payment %s via IPN." 
    5960msgstr "" 
     
    8889 
    8990#: includes/includes/settings-esewa.php:32 
    90 msgid "Service Code" 
     91msgid "Service code" 
    9192msgstr "" 
    9293 
     
    9899 
    99100#: includes/includes/settings-esewa.php:40 
    100 msgid "Invoice Prefix" 
     101msgid "Invoice prefix" 
    101102msgstr "" 
    102103 
     
    109110 
    110111#: includes/includes/settings-esewa.php:47 
    111 msgid "Sandbox Mode" 
     112msgid "Sandbox mode" 
    112113msgstr "" 
    113114 
     
    119120msgid "" 
    120121"Enable eSewa sandbox to test payments. Sign up for a developer account " 
    121 "%shere%s." 
     122"%1$shere%2$s." 
    122123msgstr "" 
    123124 
    124125#: includes/includes/settings-esewa.php:54 
    125 msgid "Debug Log" 
     126msgid "Debug log" 
    126127msgstr "" 
    127128 
     
    135136 
    136137#: woocommerce-esewa.php:109 
    137 msgid "View Settings" 
     138msgid "View settings" 
    138139msgstr "" 
    139140 
  • woocommerce-esewa/trunk/readme.txt

    r1318975 r1547499  
    33Tags: woocommerce, esewa 
    44Requires at least: 4.0 
    5 Tested up to: 4.4 
    6 Stable tag: 1.4.0 
     5Tested up to: 4.7 
     6Stable tag: 1.5.0 
    77License: GPLv3 or later 
    8 License URI: http://www.gnu.org/licenses/gpl-3.0.html 
     8License URI: https://www.gnu.org/licenses/gpl-3.0.html 
    99 
    1010Adds eSewa as payment gateway in WooCommerce plugin. 
     
    1616This plugin adds eSewa gateway to WooCommerce. 
    1717 
    18 Please notice that [WooCommerce](http://wordpress.org/plugins/woocommerce/) must be installed and active. 
     18Please notice that [WooCommerce](https://wordpress.org/plugins/woocommerce/) must be installed and active. 
    1919 
    2020= Introduction = 
     
    2828= Installation = 
    2929 
    30 Check out our installation guide and configuration of WooCommerce eSewa tab [Installation](http://wordpress.org/extend/plugins/woocommerce-esewa/installation/). 
     30Check out our installation guide and configuration of WooCommerce eSewa tab [Installation](https://wordpress.org/plugins/woocommerce-esewa/installation/). 
    3131 
    3232= Questions? = 
     
    3434You can answer your questions using: 
    3535 
    36 * Our Session [FAQ](http://wordpress.org/extend/plugins/woocommerce-esewa/faq/). 
    37 * Creating a topic in the [WordPress support forum](http://wordpress.org/support/plugin/woocommerce-esewa) (English only). 
     36* Our Session [FAQ](https://wordpress.org/plugins/woocommerce-esewa/faq/). 
     37* Creating a topic in the [WordPress support forum](https://wordpress.org/support/plugin/woocommerce-esewa) (English only). 
    3838 
    3939= Contribute = 
     
    107107== Changelog == 
    108108 
     109= 1.5.0 = 
     110* Fix - Plugins action settings link. 
     111* Tweak - More logging for request args. 
     112* Tweak - Define full path for includes. 
     113* Tweak - Add support for WC_Logger pluggable via wc_get_logger function. 
     114 
    109115= 1.4.0 = 
    110116* Deprecated - PDT Check as IPN is sufficient for processing order. 
  • woocommerce-esewa/trunk/woocommerce-esewa.php

    r1318975 r1547499  
    44 * Plugin URI: https://github.com/axisthemes/woocommerce-esewa 
    55 * Description: WooCommerce eSewa is a Nepali payment gateway for WooCommerce. 
    6  * Version: 1.4.0 
     6 * Version: 1.5.0 
    77 * Author: AxisThemes 
    88 * Author URI: http://axisthemes.com 
     
    2727     * @var string 
    2828     */ 
    29     const VERSION = '1.4.0'; 
     29    const VERSION = '1.5.0'; 
    3030 
    3131    /** 
     
    4848            // Hooks. 
    4949            add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) ); 
    50             add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( __CLASS__, 'plugin_action_links' ) ); 
     50            add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) ); 
    5151        } else { 
    5252            add_action( 'admin_notices', array( $this, 'woocommerce_missing_notice' ) ); 
     
    8686     */ 
    8787    private function includes() { 
    88         include_once( 'includes/class-wc-esewa-gateway.php' ); 
     88        include_once( dirname( __FILE__ ) . '/includes/class-wc-esewa-gateway.php' ); 
    8989    } 
    9090 
     
    101101 
    102102    /** 
    103      * Show action links on the plugin screen. 
    104      * @param  mixed $links Plugin Action links. 
     103     * Display action links in the Plugins list table. 
     104     * @param  array $actions 
    105105     * @return array 
    106106     */ 
    107     public static function plugin_action_links( $links ) { 
    108         $action_links = array( 
    109             'settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=wc_gateway_esewa' ) . '" title="' . esc_attr( __( 'View Settings', 'woocommerce-esewa' ) ) . '">' . __( 'Settings', 'woocommerce-esewa' ) . '</a>', 
     107    public function plugin_action_links( $actions ) { 
     108        $new_actions = array( 
     109            'settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=esewa' ) . '" title="' . esc_attr( __( 'View settings', 'woocommerce-esewa' ) ) . '">' . __( 'Settings', 'woocommerce-esewa' ) . '</a>', 
    110110        ); 
    111111 
    112         return array_merge( $action_links, $links ); 
     112        return array_merge( $new_actions, $actions ); 
    113113    } 
    114114 
     
    122122} 
    123123 
    124 add_action( 'plugins_loaded', array( 'WC_eSewa', 'get_instance' ), 0 ); 
     124add_action( 'plugins_loaded', array( 'WC_eSewa', 'get_instance' ) ); 
    125125 
    126126endif; 
Note: See TracChangeset for help on using the changeset viewer.