Changeset 2170236
- Timestamp:
- 10/08/2019 07:36:04 PM (6 years ago)
- Location:
- easy-liqpay
- Files:
-
- 73 added
- 4 deleted
- 9 edited
- 5 copied
- 1 moved
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
tags/0.8.4 (added)
-
tags/0.8.4/admin (added)
-
tags/0.8.4/admin/admin.php (added)
-
tags/0.8.4/admin/setting.php (added)
-
tags/0.8.4/common.php (added)
-
tags/0.8.4/easy-liqpay.php (added)
-
tags/0.8.4/img (added)
-
tags/0.8.4/img/menu-icon.png (added)
-
tags/0.8.4/include (added)
-
tags/0.8.4/include/SDK (added)
-
tags/0.8.4/include/SDK/LiqPay.php (added)
-
tags/0.8.4/include/callback.php (added)
-
tags/0.8.4/include/classes (added)
-
tags/0.8.4/include/classes/ELiq_Pay.php (added)
-
tags/0.8.4/include/classes/ELiq_Pay_Backend.php (added)
-
tags/0.8.4/include/classes/ELiq_Pay_Donat.php (added)
-
tags/0.8.4/include/classes/ELiq_Pay_Exception.php (added)
-
tags/0.8.4/include/classes/ELiq_Pay_Field.php (added)
-
tags/0.8.4/include/classes/ELiq_Pay_Page_Builder.php (copied) (copied from easy-liqpay/trunk/core/classes/ELiqPayPageBuilder.php) (6 diffs, 1 prop)
-
tags/0.8.4/include/classes/ELiq_Pay_Request.php (added)
-
tags/0.8.4/include/fields (added)
-
tags/0.8.4/include/fields/checkbox.php (added)
-
tags/0.8.4/include/fields/radio.php (added)
-
tags/0.8.4/include/fields/select.php (added)
-
tags/0.8.4/include/fields/text.php (added)
-
tags/0.8.4/include/fields/textarea.php (added)
-
tags/0.8.4/include/load_fields.php (copied) (copied from easy-liqpay/trunk/core/load_fields.php) (1 prop)
-
tags/0.8.4/languages (added)
-
tags/0.8.4/languages/eliqpay-ru_RU.mo (added)
-
tags/0.8.4/languages/eliqpay-ru_RU.po (added)
-
tags/0.8.4/languages/eliqpay-uk_UA.mo (added)
-
tags/0.8.4/languages/eliqpay-uk_UA.po (added)
-
tags/0.8.4/languages/eliqpay.pot (added)
-
tags/0.8.4/public (added)
-
tags/0.8.4/public/assets (added)
-
tags/0.8.4/public/assets/css (added)
-
tags/0.8.4/public/assets/css/elp-common.css (added)
-
tags/0.8.4/public/assets/js (added)
-
tags/0.8.4/public/assets/js/elp-scripts.js (added)
-
tags/0.8.4/public/assets/js/scripts.js (added)
-
tags/0.8.4/public/noscripthandler.php (added)
-
tags/0.8.4/public/widgets (added)
-
tags/0.8.4/public/widgets/donat (added)
-
tags/0.8.4/public/widgets/donat/ELiq_Pay_Donat_Widget.php (copied) (copied from easy-liqpay/trunk/public/widgets/widget-donat.php) (7 diffs, 1 prop)
-
tags/0.8.4/public/widgets/donat/assets (added)
-
tags/0.8.4/public/widgets/donat/assets/css (added)
-
tags/0.8.4/public/widgets/donat/assets/css/styles.css (added)
-
tags/0.8.4/public/widgets/donat/assets/js (added)
-
tags/0.8.4/public/widgets/donat/assets/js/scripts.js (added)
-
tags/0.8.4/readme.txt (added)
-
trunk/SDK (deleted)
-
trunk/admin/admin.php (modified) (7 diffs)
-
trunk/common.php (modified) (2 diffs)
-
trunk/core (deleted)
-
trunk/easy-liqpay.php (modified) (3 diffs)
-
trunk/elp-callback-api.php (deleted)
-
trunk/include (added)
-
trunk/include/SDK (added)
-
trunk/include/SDK/LiqPay.php (added)
-
trunk/include/callback.php (added)
-
trunk/include/classes (added)
-
trunk/include/classes/ELiq_Pay.php (added)
-
trunk/include/classes/ELiq_Pay_Backend.php (added)
-
trunk/include/classes/ELiq_Pay_Donat.php (added)
-
trunk/include/classes/ELiq_Pay_Exception.php (added)
-
trunk/include/classes/ELiq_Pay_Field.php (added)
-
trunk/include/classes/ELiq_Pay_Page_Builder.php (copied) (copied from easy-liqpay/trunk/core/classes/ELiqPayPageBuilder.php) (6 diffs, 1 prop)
-
trunk/include/classes/ELiq_Pay_Request.php (added)
-
trunk/include/fields (added)
-
trunk/include/fields/checkbox.php (added)
-
trunk/include/fields/radio.php (added)
-
trunk/include/fields/select.php (added)
-
trunk/include/fields/text.php (added)
-
trunk/include/fields/textarea.php (added)
-
trunk/include/load_fields.php (copied) (copied from easy-liqpay/trunk/core/load_fields.php) (1 prop)
-
trunk/public/assets/css/elp-common.css (modified) (2 diffs)
-
trunk/public/assets/js/elp-scripts.js (modified) (1 diff)
-
trunk/public/assets/js/scripts.js (added)
-
trunk/public/noscripthandler.php (modified) (1 diff)
-
trunk/public/utils.php (deleted)
-
trunk/public/widgets/donat (added)
-
trunk/public/widgets/donat/ELiq_Pay_Donat_Widget.php (moved) (moved from easy-liqpay/trunk/public/widgets/widget-donat.php) (7 diffs, 1 prop)
-
trunk/public/widgets/donat/assets (added)
-
trunk/public/widgets/donat/assets/css (added)
-
trunk/public/widgets/donat/assets/css/styles.css (added)
-
trunk/public/widgets/donat/assets/js (added)
-
trunk/public/widgets/donat/assets/js/scripts.js (added)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
easy-liqpay/tags/0.8.4/include/classes/ELiq_Pay_Page_Builder.php
-
Property
svn:eol-style
set to
native
r1403809 r2170236 1 1 <?php 2 2 3 class ELiq PayPageBuilder3 class ELiq_Pay_Page_Builder 4 4 { 5 5 private $fields =[]; 6 6 private $user_capability = 'manage_options'; 7 7 private $current_section = ''; 8 private $eliqpal_option;9 8 private $subpages = []; 10 9 private $fieldsController; … … 12 11 13 12 function __construct() { 14 $this->eliqpal_option = elp_get_option();15 16 13 add_action( 'admin_menu', [ $this, '_registerAdminPages' ] ); 17 14 add_action( 'admin_init', [ $this, '_registerSettingsFields' ] ); … … 66 63 67 64 private function getFieldName( $name ) { 68 return EL IQPAY_OPTION_NAME ."[$name]";65 return ELiq_Pay::OPTION_NAME ."[$name]"; 69 66 } 70 67 … … 95 92 'eliqpay_setup', 96 93 $sp['callback'], 97 plugins_url( ELIQPAY_NAME .'/img/menu-icon.png' ),94 plugins_url('easyliqpay/img/menu-icon.png' ), 98 95 85 99 96 ); … … 162 159 163 160 164 $value = $this->getValue( $args['name']);161 $value = ELiq_Pay::get($args['name']); 165 162 166 163 if ( isset( $args['value'] ) ) { … … 180 177 } 181 178 182 public function getValue( $field_name ) {183 return isset( $this->eliqpal_option[ $field_name ] ) ? $this->eliqpal_option[ $field_name ] : null;184 }185 186 179 187 180 public function handlerPreUpdateOptionFilter( $value, $option, $old_value ) { -
Property
svn:eol-style
set to
-
easy-liqpay/tags/0.8.4/include/load_fields.php
-
Property
svn:eol-style
set to
native
-
Property
svn:eol-style
set to
-
easy-liqpay/tags/0.8.4/public/widgets/donat/ELiq_Pay_Donat_Widget.php
-
Property
svn:eol-style
set to
native
r1403809 r2170236 1 1 <?php 2 class ELiq PayWidgetDonat extends WP_Widget {2 class ELiq_Pay_Donat_Widget extends WP_Widget { 3 3 4 4 function __construct() { 5 5 $widget_ops = array( 6 6 'classname' => 'elp_widget_donat', 7 'description' => __( 'Donat with LiqPay', 'eliqpay'),7 'description' => __( 'Donat by LiqPay', ELIQPAY_TEXTDOMAIN ), 8 8 ); 9 9 10 parent::__construct( 'elp_widget_donat', __( 'Donations', 'eliqpay'), $widget_ops );10 parent::__construct( 'elp_widget_donat', __( 'Donations', ELIQPAY_TEXTDOMAIN ), $widget_ops ); 11 11 } 12 12 … … 15 15 echo $args['before_widget']; 16 16 17 if ( !empty( $instance['currency'] ) ) { 18 $instance['currency'] = array_combine( 19 array_values( $instance['currency'] ), 20 array_pad( 21 [], 22 count($instance['currency']), 23 1 24 ) 25 ); 26 } else { 27 $instance['currency'] = elp_get_option('currency'); 28 } 29 30 echo elp_donat_template( $instance ); 17 echo ELiq_Pay_Donat::template( $instance ); 31 18 32 19 echo $args['after_widget']; … … 39 26 $instance['default_amount'] = !empty( $new_instance['default_amount'] ) ? $new_instance['default_amount'] : ''; 40 27 $instance['description'] = !empty( $new_instance['description'] ) ? strip_tags( $new_instance['description'] ) : ''; 41 $instance['currency'] = !empty( $new_instance['currency'] ) ? $new_instance['currency'] : array _keys( elp_get_option('curreny'));28 $instance['currency'] = !empty( $new_instance['currency'] ) ? $new_instance['currency'] : array(); 42 29 $instance['language'] = !empty( $new_instance['language'] ) ? $new_instance['language'] : ''; 43 30 $instance['result_url'] = !empty( $new_instance['result_url'] ) ? strip_tags( $new_instance['result_url'] ) : ''; … … 47 34 48 35 function form( $instance ) { 49 $options = elp_get_option(); 50 51 $title = !empty( $instance['title'] ) ? $instance['title'] : __('Donation', 'eliqpay' ) ; 36 $title = !empty( $instance['title'] ) ? $instance['title'] : __('Donation', ELIQPAY_TEXTDOMAIN ) ; 52 37 $text_before = !empty( $instance['text_before'] ) ? $instance['text_before'] : ''; 53 38 $default_amount = isset( $instance['default_amount'] ) ? $instance['default_amount'] : ''; 54 $description = !empty( $instance['description'] ) ? $instance['description'] : $options['payment_description'];55 $currency = !empty( $instance['currency'] ) ? $instance['currency'] : array_keys( $options['currency']);56 $language = !empty( $instance['language'] ) ? $instance['language'] : $options['language'];57 $result_url = !empty( $instance['result_url'] ) ? $instance['result_url'] : $options['result_url'];39 $description = !empty( $instance['description'] ) ? $instance['description'] : ELiq_Pay::get('payment_description'); 40 $currency = !empty( $instance['currency'] ) ? $instance['currency'] : array_keys( ELiq_Pay::get('currency') ); 41 $language = !empty( $instance['language'] ) ? $instance['language'] : ELiq_Pay::get('language'); 42 $result_url = !empty( $instance['result_url'] ) ? $instance['result_url'] : ELiq_Pay::get('result_url'); 58 43 59 44 ?> 60 45 <p> 61 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'eliqpay'); ?>:</label>46 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', ELIQPAY_TEXTDOMAIN ); ?>:</label> 62 47 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> 63 48 </p> 64 49 <p> 65 <label for="<?php echo $this->get_field_id( 'text_before' ); ?>"><?php _e( 'Text before form', 'eliqpay'); ?>:</label>50 <label for="<?php echo $this->get_field_id( 'text_before' ); ?>"><?php _e( 'Text before form', ELIQPAY_TEXTDOMAIN ); ?>:</label> 66 51 <input class="widefat" id="<?php echo $this->get_field_id( 'text_before' ); ?>" name="<?php echo $this->get_field_name( 'text_before' ); ?>" type="text" value="<?php echo esc_attr( $text_before ); ?>"> 67 52 </p> 68 53 <p> 69 <label for="<?php echo $this->get_field_id( 'default_amount' ); ?>"><?php _e( 'Default amount', 'eliqpay'); ?>:</label>54 <label for="<?php echo $this->get_field_id( 'default_amount' ); ?>"><?php _e( 'Default amount', ELIQPAY_TEXTDOMAIN ); ?>:</label> 70 55 <input class="widefat" id="<?php echo $this->get_field_id( 'default_amount' ); ?>" name="<?php echo $this->get_field_name( 'default_amount' ); ?>" type="text" value="<?php echo esc_attr( $default_amount ); ?>"> 71 56 </p> 72 57 <p> 73 <label for="<?php echo $this->get_field_id( 'description' ); ?>"><?php _e( 'Payment description', 'eliqpay'); ?>:</label>58 <label for="<?php echo $this->get_field_id( 'description' ); ?>"><?php _e( 'Payment description', ELIQPAY_TEXTDOMAIN ); ?>:</label> 74 59 <input class="widefat" id="<?php echo $this->get_field_id( 'description' ); ?>" name="<?php echo $this->get_field_name( 'description' ); ?>" type="text" value="<?php echo esc_attr( $description ); ?>"> 75 60 </p> 76 61 <p> 77 <label for="<?php echo $this->get_field_id( 'currency' ); ?>"><?php _e( 'Currency', 'eliqpay'); ?>:</label>62 <label for="<?php echo $this->get_field_id( 'currency' ); ?>"><?php _e( 'Currency', ELIQPAY_TEXTDOMAIN ); ?>:</label> 78 63 <?php 79 64 $avaible_curreny = [ 80 'UAH' => __('UAH', 'eliqpay'),81 'RUB' => __('RUB', 'eliqpay'),82 'USD' => __('USD', 'eliqpay'),83 'EUR' => __('EUR', 'eliqpay')65 'UAH' => __('UAH', ELIQPAY_TEXTDOMAIN ), 66 'RUB' => __('RUB', ELIQPAY_TEXTDOMAIN ), 67 'USD' => __('USD', ELIQPAY_TEXTDOMAIN ), 68 'EUR' => __('EUR', ELIQPAY_TEXTDOMAIN ) 84 69 ]; 85 70 foreach ($avaible_curreny as $key => $value) { … … 90 75 </p> 91 76 <p> 92 <label for="<?php echo $this->get_field_id( 'language' ); ?>"><?php _e( 'Language', 'eliqpay'); ?>:</label>77 <label for="<?php echo $this->get_field_id( 'language' ); ?>"><?php _e( 'Language', ELIQPAY_TEXTDOMAIN ); ?>:</label> 93 78 <select id="<?php echo $this->get_field_id( 'language' ); ?>" name="<?php echo $this->get_field_name( 'language' ); ?>"> 94 79 <?php 95 80 $avaible_languages = [ 96 'ru' => __('Russian', 'eliqpay'),97 'en' => __('English', 'eliqpay')81 'ru' => __('Russian', ELIQPAY_TEXTDOMAIN ), 82 'en' => __('English', ELIQPAY_TEXTDOMAIN ) 98 83 ]; 99 84 foreach ($avaible_languages as $key => $value) { … … 105 90 </p> 106 91 <p> 107 <label for="<?php echo $this->get_field_id( 'result_url' ); ?>"><?php _e( 'Result URL', 'eliqpay'); ?>:</label>92 <label for="<?php echo $this->get_field_id( 'result_url' ); ?>"><?php _e( 'Result URL', ELIQPAY_TEXTDOMAIN ); ?>:</label> 108 93 <input class="widefat" id="<?php echo $this->get_field_id( 'result_url' ); ?>" name="<?php echo $this->get_field_name( 'result_url' ); ?>" type="text" value="<?php echo esc_attr( $result_url ); ?>"> 109 94 </p> … … 111 96 } 112 97 } 113 114 function elp_register_widgets() {115 register_widget( 'ELiqPayWidgetDonat' );116 }117 118 add_action( 'widgets_init', 'elp_register_widgets' ); -
Property
svn:eol-style
set to
-
easy-liqpay/trunk/admin/admin.php
r1403805 r2170236 1 1 <?php 2 require_once ELIQPAY_CLASSES_PATH .'/ELiqPayPageBuilder.php';3 2 4 add_ option( ELIQPAY_OPTION_NAME, $default_options, false, false);3 add_action('init', 'admin_page_handler'); 5 4 6 $admin = new ELiqPayPageBuilder(); 5 function admin_page_handler() { 6 #Set init 7 8 require_once ELIQPAY_CLASSES_PATH .'/ELiq_Pay_Page_Builder.php'; 9 10 #$eLiqPaySettings 11 12 $admin = new ELiq_Pay_Page_Builder(); 7 13 8 14 $admin->registerSubpage( … … 65 71 'section' => 'required_setting', 66 72 'required' => true, 67 'value' => $default_options['payment_description'],73 'value' => ELiq_Pay::get('payment_description'), 68 74 'attr' => [ 69 75 'rows' => '5', … … 77 83 'section' => 'required_setting', 78 84 'required' => true, 79 'checked' => array_keys( $default_options['currency']),85 'checked' => array_keys( ELiq_Pay::get('currency') ), 80 86 'values' => [ 81 87 'UAH' => __( 'UAH', 'eliqpay' ), … … 96 102 'label' => __( 'Result URL', 'eliqpay' ), 97 103 'section' => 'optional_setting', 98 'value' => $default_options['result_url'],104 'value' => ELiq_Pay::get('result_url'), 99 105 'attr' => [ 100 106 'size' => '40' … … 107 113 'section' => 'optional_setting', 108 114 'required' => true, 109 'value' => $default_options['default_amount'],115 'value' => ELiq_Pay::get('default_amount'), 110 116 'description' => '' 111 117 ], … … 115 121 'label' => __( 'Language', 'eliqpay' ), 116 122 'section' => 'optional_setting', 117 'value' => $default_options['language'],123 'value' => ELiq_Pay::get('language'), 118 124 'values' => [ 119 125 'ru' => __('Russian', 'eliqpay' ), … … 132 138 ); 133 139 140 } 141 142 134 143 function elp_setup_page() { 135 144 require_once ELIQPAY_ADMIN_PATH . '/setting.php'; -
easy-liqpay/trunk/common.php
r1403794 r2170236 5 5 wp_register_script( 'elq_scripts', plugins_url( 'public/assets/js/elp-scripts.js', __FILE__ ), ['jquery'], ELIQPAY_VERSION, true ); 6 6 7 $elp_data = [7 $elp_data = array( 8 8 'ajaxurl' => admin_url('admin-ajax.php') 9 ];9 ); 10 10 wp_localize_script( 'elq_scripts', 'elp', $elp_data ); 11 11 } 12 12 13 13 if ( !wp_style_is( 'elq_styles', 'registered' ) ) { 14 wp_register_style( 'elq_styles', plugins_url( 'public/assets/css/elp-common.css', __FILE__ ), [], ELIQPAY_VERSION );14 wp_register_style( 'elq_styles', plugins_url( 'public/assets/css/elp-common.css', __FILE__ ), array(), ELiq_Pay::VERSION ); 15 15 } 16 16 } … … 27 27 28 28 add_action('wp_footer', 'elq_load_styles'); 29 30 function elp_get_option( $opt_name = '' ) {31 $options = get_option( ELIQPAY_OPTION_NAME, [] );32 33 if ( !empty( $opt_name ) ) {34 return isset( $options[$opt_name] ) ? $options[$opt_name] : null;35 }36 37 return $options;38 } -
easy-liqpay/trunk/easy-liqpay.php
r1403809 r2170236 1 1 <?php 2 2 /* 3 Plugin Name: Easy LiqPay4 Description: Wordpress LiqPay donation plugin5 Version: 0.8.1 6 Author: Nick Antal7 License: GPLv2 or later8 Text Domain: eliqpay9 Domain Path: /languages3 * Plugin Name: Easy LiqPay 4 * Description: Wordpress LiqPay donation plugin 5 * Version: 0.8.2 6 * Author: Nick Antal 7 * License: GPLv2 or later 8 * Text Domain: eliqpay 9 * Domain Path: /languages 10 10 */ 11 11 … … 27 27 */ 28 28 29 define( 'ELIQPAY_VERSION', '0.8.1'); 30 define( 'ELIQPAY_NAME', 'easy-liqpay'); 29 define( 'ELIQPAY_VERSION', '0.8.2'); #deprecated 31 30 define( 'ELIQPAY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 32 31 define( 'ELIQPAY_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 33 define( 'ELIQPAY_CORE', ELIQPAY_PLUGIN_PATH .' core' );32 define( 'ELIQPAY_CORE', ELIQPAY_PLUGIN_PATH .'include' ); 34 33 define( 'ELIQPAY_CLASSES_PATH', ELIQPAY_CORE . '/classes' ); 35 34 define( 'ELIQPAY_ADMIN_PATH', ELIQPAY_PLUGIN_PATH . 'admin' ); … … 37 36 define( 'ELIQPAY_WIDGETS_PATH', ELIQPAY_PUBLIC_PATH . '/widgets' ); 38 37 define( 'ELIQPAY_CALLBACK_API', ELIQPAY_PLUGIN_URL .'elp-callback-api.php' ); 39 define( 'ELIQPAY_OPTION_NAME', 'eliqpay_option' ); 38 define( 'ELIQPAY_OPTION_NAME', 'eliqpay_option' ); #depricated 39 define( 'ELIQPAY_TEXTDOMAIN', 'eliqpay'); 40 40 41 41 // Localization 42 42 add_action( 'plugins_loaded', 'eliqpay_load_textdomain' ); 43 43 function eliqpay_load_textdomain() { 44 load_plugin_textdomain( 'eliqpay', false, basename( dirname( __FILE__ ) ) . '/languages' );44 load_plugin_textdomain( ELIQPAY_TEXTDOMAIN, false, ELIQPAY_PLUGIN_PATH . 'languages' ); 45 45 } 46 46 47 //require_once ELIQPAY_PLUGIN_PATH .'/languages/l10n.php'; 47 require_once ELIQPAY_CLASSES_PATH.'/ELiq_Pay_Exception.php'; 48 require_once ELIQPAY_CLASSES_PATH.'/ELiq_Pay.php'; 48 49 50 try { 51 $ELiqPay = ELiq_Pay::getInstance(); 52 } catch (ELiq_Pay_Exception $ex) { 53 wp_die($ex); 54 } 49 55 require_once ELIQPAY_PLUGIN_PATH .'/common.php'; 50 require_once ELIQPAY_PUBLIC_PATH .'/utils.php';51 52 add_action( 'init', function() {53 //die();54 55 if ( is_admin() ) {56 $default_options = [57 'private_key' => '',58 'public_key' => '',59 'payment_description' => __( 'Donation', 'eliqpay' ),60 'currency' => ['UAH' => '1'],61 'result_url' => get_bloginfo('url'),62 'default_amount' => '10',63 'language' => 'ru'64 ];65 require_once ELIQPAY_ADMIN_PATH . '/admin.php';66 }67 } );68 69 require_once ELIQPAY_WIDGETS_PATH .'/widget-donat.php';70 71 require_once ELIQPAY_CLASSES_PATH .'/ELiqPayProcess.php'; -
easy-liqpay/trunk/include/classes/ELiq_Pay_Page_Builder.php
-
Property
svn:eol-style
set to
native
r1403809 r2170236 1 1 <?php 2 2 3 class ELiq PayPageBuilder3 class ELiq_Pay_Page_Builder 4 4 { 5 5 private $fields =[]; 6 6 private $user_capability = 'manage_options'; 7 7 private $current_section = ''; 8 private $eliqpal_option;9 8 private $subpages = []; 10 9 private $fieldsController; … … 12 11 13 12 function __construct() { 14 $this->eliqpal_option = elp_get_option();15 16 13 add_action( 'admin_menu', [ $this, '_registerAdminPages' ] ); 17 14 add_action( 'admin_init', [ $this, '_registerSettingsFields' ] ); … … 66 63 67 64 private function getFieldName( $name ) { 68 return EL IQPAY_OPTION_NAME ."[$name]";65 return ELiq_Pay::OPTION_NAME ."[$name]"; 69 66 } 70 67 … … 95 92 'eliqpay_setup', 96 93 $sp['callback'], 97 plugins_url( ELIQPAY_NAME .'/img/menu-icon.png' ),94 plugins_url('easyliqpay/img/menu-icon.png' ), 98 95 85 99 96 ); … … 162 159 163 160 164 $value = $this->getValue( $args['name']);161 $value = ELiq_Pay::get($args['name']); 165 162 166 163 if ( isset( $args['value'] ) ) { … … 180 177 } 181 178 182 public function getValue( $field_name ) {183 return isset( $this->eliqpal_option[ $field_name ] ) ? $this->eliqpal_option[ $field_name ] : null;184 }185 186 179 187 180 public function handlerPreUpdateOptionFilter( $value, $option, $old_value ) { -
Property
svn:eol-style
set to
-
easy-liqpay/trunk/include/load_fields.php
-
Property
svn:eol-style
set to
native
-
Property
svn:eol-style
set to
-
easy-liqpay/trunk/public/assets/css/elp-common.css
r1403805 r2170236 17 17 font-weight: bold; 18 18 outline: none; 19 19 20 20 padding-left: 18px; 21 21 padding-right: 30px; 22 22 23 23 text-align: center; 24 24 -webkit-transition: all 0.2s ease-in-out; … … 141 141 142 142 .elp-conteiner .elp-title { 143 margin: -2 0px -20px 0;143 margin: -21px -21px 0; 144 144 border-radius: 20px 20px 0 0; 145 145 padding: 10px 20px; -
easy-liqpay/trunk/public/assets/js/elp-scripts.js
r1403805 r2170236 11 11 $('select.elp-input-currency').niceSelect(); 12 12 } 13 13 14 14 var elpForm = $('form.elp-donat-form'); 15 15 16 16 17 17 elpForm.attr('action', 'https://www.liqpay.com/api/checkout' ).on('submit', function(e, submitForm) { 18 18 if ( submitForm ) { 19 19 return true; 20 20 } 21 21 22 22 e.preventDefault(); 23 23 24 24 var self = $(this), 25 25 sendData = { 26 action: 'elp_ process',26 action: 'elp_donat', 27 27 amount: $('[name="amount"]', self).val(), 28 28 currency: $('[name="currency"]', self).val() -
easy-liqpay/trunk/public/noscripthandler.php
r1403805 r2170236 1 <?php 2 /* 3 1. include liqpay sdk 4 2. generate form from param 5 * 3. Style form --> move button to middle of screen 6 * 7 */ 8 ?> 9 1 10 <form action='https://www.liqpay.com/api/checkout' method='POST' accept-charset="utf-8" name="elpform"> 2 11 <?php -
easy-liqpay/trunk/public/widgets/donat/ELiq_Pay_Donat_Widget.php
-
Property
svn:eol-style
set to
native
r1403809 r2170236 1 1 <?php 2 class ELiq PayWidgetDonat extends WP_Widget {2 class ELiq_Pay_Donat_Widget extends WP_Widget { 3 3 4 4 function __construct() { 5 5 $widget_ops = array( 6 6 'classname' => 'elp_widget_donat', 7 'description' => __( 'Donat with LiqPay', 'eliqpay'),7 'description' => __( 'Donat by LiqPay', ELIQPAY_TEXTDOMAIN ), 8 8 ); 9 9 10 parent::__construct( 'elp_widget_donat', __( 'Donations', 'eliqpay'), $widget_ops );10 parent::__construct( 'elp_widget_donat', __( 'Donations', ELIQPAY_TEXTDOMAIN ), $widget_ops ); 11 11 } 12 12 … … 15 15 echo $args['before_widget']; 16 16 17 if ( !empty( $instance['currency'] ) ) { 18 $instance['currency'] = array_combine( 19 array_values( $instance['currency'] ), 20 array_pad( 21 [], 22 count($instance['currency']), 23 1 24 ) 25 ); 26 } else { 27 $instance['currency'] = elp_get_option('currency'); 28 } 29 30 echo elp_donat_template( $instance ); 17 echo ELiq_Pay_Donat::template( $instance ); 31 18 32 19 echo $args['after_widget']; … … 39 26 $instance['default_amount'] = !empty( $new_instance['default_amount'] ) ? $new_instance['default_amount'] : ''; 40 27 $instance['description'] = !empty( $new_instance['description'] ) ? strip_tags( $new_instance['description'] ) : ''; 41 $instance['currency'] = !empty( $new_instance['currency'] ) ? $new_instance['currency'] : array _keys( elp_get_option('curreny'));28 $instance['currency'] = !empty( $new_instance['currency'] ) ? $new_instance['currency'] : array(); 42 29 $instance['language'] = !empty( $new_instance['language'] ) ? $new_instance['language'] : ''; 43 30 $instance['result_url'] = !empty( $new_instance['result_url'] ) ? strip_tags( $new_instance['result_url'] ) : ''; … … 47 34 48 35 function form( $instance ) { 49 $options = elp_get_option(); 50 51 $title = !empty( $instance['title'] ) ? $instance['title'] : __('Donation', 'eliqpay' ) ; 36 $title = !empty( $instance['title'] ) ? $instance['title'] : __('Donation', ELIQPAY_TEXTDOMAIN ) ; 52 37 $text_before = !empty( $instance['text_before'] ) ? $instance['text_before'] : ''; 53 38 $default_amount = isset( $instance['default_amount'] ) ? $instance['default_amount'] : ''; 54 $description = !empty( $instance['description'] ) ? $instance['description'] : $options['payment_description'];55 $currency = !empty( $instance['currency'] ) ? $instance['currency'] : array_keys( $options['currency']);56 $language = !empty( $instance['language'] ) ? $instance['language'] : $options['language'];57 $result_url = !empty( $instance['result_url'] ) ? $instance['result_url'] : $options['result_url'];39 $description = !empty( $instance['description'] ) ? $instance['description'] : ELiq_Pay::get('payment_description'); 40 $currency = !empty( $instance['currency'] ) ? $instance['currency'] : array_keys( ELiq_Pay::get('currency') ); 41 $language = !empty( $instance['language'] ) ? $instance['language'] : ELiq_Pay::get('language'); 42 $result_url = !empty( $instance['result_url'] ) ? $instance['result_url'] : ELiq_Pay::get('result_url'); 58 43 59 44 ?> 60 45 <p> 61 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'eliqpay'); ?>:</label>46 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', ELIQPAY_TEXTDOMAIN ); ?>:</label> 62 47 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> 63 48 </p> 64 49 <p> 65 <label for="<?php echo $this->get_field_id( 'text_before' ); ?>"><?php _e( 'Text before form', 'eliqpay'); ?>:</label>50 <label for="<?php echo $this->get_field_id( 'text_before' ); ?>"><?php _e( 'Text before form', ELIQPAY_TEXTDOMAIN ); ?>:</label> 66 51 <input class="widefat" id="<?php echo $this->get_field_id( 'text_before' ); ?>" name="<?php echo $this->get_field_name( 'text_before' ); ?>" type="text" value="<?php echo esc_attr( $text_before ); ?>"> 67 52 </p> 68 53 <p> 69 <label for="<?php echo $this->get_field_id( 'default_amount' ); ?>"><?php _e( 'Default amount', 'eliqpay'); ?>:</label>54 <label for="<?php echo $this->get_field_id( 'default_amount' ); ?>"><?php _e( 'Default amount', ELIQPAY_TEXTDOMAIN ); ?>:</label> 70 55 <input class="widefat" id="<?php echo $this->get_field_id( 'default_amount' ); ?>" name="<?php echo $this->get_field_name( 'default_amount' ); ?>" type="text" value="<?php echo esc_attr( $default_amount ); ?>"> 71 56 </p> 72 57 <p> 73 <label for="<?php echo $this->get_field_id( 'description' ); ?>"><?php _e( 'Payment description', 'eliqpay'); ?>:</label>58 <label for="<?php echo $this->get_field_id( 'description' ); ?>"><?php _e( 'Payment description', ELIQPAY_TEXTDOMAIN ); ?>:</label> 74 59 <input class="widefat" id="<?php echo $this->get_field_id( 'description' ); ?>" name="<?php echo $this->get_field_name( 'description' ); ?>" type="text" value="<?php echo esc_attr( $description ); ?>"> 75 60 </p> 76 61 <p> 77 <label for="<?php echo $this->get_field_id( 'currency' ); ?>"><?php _e( 'Currency', 'eliqpay'); ?>:</label>62 <label for="<?php echo $this->get_field_id( 'currency' ); ?>"><?php _e( 'Currency', ELIQPAY_TEXTDOMAIN ); ?>:</label> 78 63 <?php 79 64 $avaible_curreny = [ 80 'UAH' => __('UAH', 'eliqpay'),81 'RUB' => __('RUB', 'eliqpay'),82 'USD' => __('USD', 'eliqpay'),83 'EUR' => __('EUR', 'eliqpay')65 'UAH' => __('UAH', ELIQPAY_TEXTDOMAIN ), 66 'RUB' => __('RUB', ELIQPAY_TEXTDOMAIN ), 67 'USD' => __('USD', ELIQPAY_TEXTDOMAIN ), 68 'EUR' => __('EUR', ELIQPAY_TEXTDOMAIN ) 84 69 ]; 85 70 foreach ($avaible_curreny as $key => $value) { … … 90 75 </p> 91 76 <p> 92 <label for="<?php echo $this->get_field_id( 'language' ); ?>"><?php _e( 'Language', 'eliqpay'); ?>:</label>77 <label for="<?php echo $this->get_field_id( 'language' ); ?>"><?php _e( 'Language', ELIQPAY_TEXTDOMAIN ); ?>:</label> 93 78 <select id="<?php echo $this->get_field_id( 'language' ); ?>" name="<?php echo $this->get_field_name( 'language' ); ?>"> 94 79 <?php 95 80 $avaible_languages = [ 96 'ru' => __('Russian', 'eliqpay'),97 'en' => __('English', 'eliqpay')81 'ru' => __('Russian', ELIQPAY_TEXTDOMAIN ), 82 'en' => __('English', ELIQPAY_TEXTDOMAIN ) 98 83 ]; 99 84 foreach ($avaible_languages as $key => $value) { … … 105 90 </p> 106 91 <p> 107 <label for="<?php echo $this->get_field_id( 'result_url' ); ?>"><?php _e( 'Result URL', 'eliqpay'); ?>:</label>92 <label for="<?php echo $this->get_field_id( 'result_url' ); ?>"><?php _e( 'Result URL', ELIQPAY_TEXTDOMAIN ); ?>:</label> 108 93 <input class="widefat" id="<?php echo $this->get_field_id( 'result_url' ); ?>" name="<?php echo $this->get_field_name( 'result_url' ); ?>" type="text" value="<?php echo esc_attr( $result_url ); ?>"> 109 94 </p> … … 111 96 } 112 97 } 113 114 function elp_register_widgets() {115 register_widget( 'ELiqPayWidgetDonat' );116 }117 118 add_action( 'widgets_init', 'elp_register_widgets' ); -
Property
svn:eol-style
set to
-
easy-liqpay/trunk/readme.txt
r1403809 r2170236 31 31 == Changelog == 32 32 33 = 0.8.2 = 34 Update LiqPay SDK. Fix install bugs 35 33 36 = 0.8.1 = 34 37 Small fix
Note: See TracChangeset
for help on using the changeset viewer.