Changeset 1923933
- Timestamp:
- 08/13/2018 09:08:32 AM (8 years ago)
- Location:
- bank-melli-edd-gateway
- Files:
-
- 18 added
- 1 deleted
- 2 edited
-
tags/1.4/screenshot-2.png (added)
-
tags/1.5 (added)
-
tags/1.5/Melli_for_EDD.php (added)
-
tags/1.5/about.php (added)
-
tags/1.5/images (added)
-
tags/1.5/images/ESET-license-G.gif (added)
-
tags/1.5/images/icon.png (added)
-
tags/1.5/images/logo.png (added)
-
tags/1.5/images/wordpress-hosting.gif (added)
-
tags/1.5/lang (added)
-
tags/1.5/lang/ex_lang-fa_IR.mo (added)
-
tags/1.5/lang/ex_lang-fa_IR.po (added)
-
tags/1.5/melli.php (added)
-
tags/1.5/news.php (added)
-
tags/1.5/readme.txt (added)
-
tags/1.5/screenshot-1.png (added)
-
tags/1.5/screenshot-2.png (added)
-
tags/1.5/screenshot-3.png (added)
-
trunk/Melli_for_EDD.php (modified) (7 diffs)
-
trunk/menu_setup.php (deleted)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bank-melli-edd-gateway/trunk/Melli_for_EDD.php
r1834018 r1923933 2 2 /* 3 3 Plugin Name: Bank Melli Iran EDD gateway 4 Version: 1. 4.14 Version: 1.5 5 5 Description: Sadad payment gateway for Easy digital downloads(switch: 1). 6 6 Plugin URI: http://ham3da.ir/ … … 12 12 Domain Path: /lang 13 13 */ 14 15 16 add_action('plugins_loaded', 'edd_sadad1_load_textdomain'); 17 18 function edd_sadad1_load_textdomain() 19 { 20 load_plugin_textdomain('ex_lang', false, basename(dirname(__FILE__)) . '/lang'); 21 } 22 23 24 include "menu_setup.php"; 25 26 14 27 15 if (!defined('ABSPATH') ) { 28 16 die("Access Denied"); 29 17 } 30 18 19 add_action('plugins_loaded', 'edd_sadad1_load_textdomain'); 20 21 function edd_sadad1_load_textdomain() 22 { 23 load_plugin_textdomain('ex_lang', false, basename(dirname(__FILE__)) . '/lang'); 24 } 25 26 add_action('admin_menu', 'bmi_setMenu'); 27 28 function bmi_setMenu( ) 29 { 30 31 add_menu_page(__('Sadad for EDD', 'ex_lang'), __('Sadad for EDD', 'ex_lang'), 'activate_plugins', "melli_bank_gate", 'bmi_load_inteface', plugin_dir_url( __FILE__ ).'/images/icon.png'); 32 add_submenu_page("melli_bank_gate", __('About', 'ex_lang'), __('About', 'ex_lang'), 'activate_plugins', "melli_bank_gate_about", "bmi_load_about"); 33 add_submenu_page("melli_bank_gate", __('Newsletters', 'ex_lang'), __('Newsletters', 'ex_lang'), 'activate_plugins', "melli_bank_gate_news", "bmi_load_news"); 34 35 } 36 37 function bmi_load_inteface( ) 38 { 39 include dirname(__file__)."/melli.php"; 40 } 41 function bmi_load_about( ) 42 { 43 include dirname(__file__)."/about.php"; 44 } 45 function bmi_load_news( ) 46 { 47 include dirname(__file__)."/news.php"; 48 } 31 49 32 50 /////------------------------------------------------ … … 37 55 add_filter( 'edd_rial_currency_filter_after', 'edd_bmi_rial', 10, 3 ); 38 56 /////------------------------------------------------ 39 function bmi_add_gateway($gateways) { 40 $gateways['Melli'] = array('admin_label' => __('Sadad Payment Gateway', 'ex_lang'), 'checkout_label' => __('Sadad Payment Gateway', 'ex_lang')); 57 function bmi_add_gateway($gateways) 58 { 59 $gateways['melli_gate'] = array('admin_label' => __('Sadad Payment Gateway', 'ex_lang'), 'checkout_label' => __('Sadad Payment Gateway', 'ex_lang')); 41 60 return $gateways; 42 61 } 43 62 add_filter( 'edd_payment_gateways', 'bmi_add_gateway' ); 44 63 45 function bmi_cc_form () { 64 function bmi_cc_form () 65 { 46 66 do_action( 'bmi_cc_form_action' ); 47 67 } 48 add_filter( 'edd_ Melli_cc_form', 'bmi_cc_form' );68 add_filter( 'edd_melli_gate_cc_form', 'bmi_cc_form' ); 49 69 50 70 /////------------------------------------------------- … … 104 124 $_SESSION['Melli_payment'] = $payment; 105 125 $orderId = date('ym').date('His').$payment; 106 $return = add_query_arg(array(' order'=> 'Melli', 'orderId'=>$orderId), get_permalink($edd_options['success_page']));126 $return = add_query_arg(array('gate'=> 'melli_gate', 'orderId'=>$orderId), get_permalink($edd_options['success_page'])); 107 127 $amount = $purchase_data['price']; 108 128 $localDate = date("Ymd"); … … 143 163 } 144 164 } 145 add_action('edd_gateway_ Melli', 'bmi_process_payment');165 add_action('edd_gateway_melli_gate', 'bmi_process_payment'); 146 166 147 167 /////---------------------------------------------------- … … 157 177 158 178 159 if (isset($_GET['order']) && $_GET[' order'] == 'Melli' && $_SESSION['Melli_payment'] == substr($_GET["orderId"], 10))179 if (isset($_GET['order']) && $_GET['gate'] == 'melli_gate' && $_SESSION['Melli_payment'] == substr($_GET["orderId"], 10)) 160 180 { 161 181 $payment = $_SESSION['Melli_payment']; … … 345 365 return $tmess.$ErrorDesc; 346 366 } 347 ?> -
bank-melli-edd-gateway/trunk/readme.txt
r1834018 r1923933 40 40 41 41 == Upgrade Notice == 42 = 1.5 = 43 * به دلیل تغییر شناسه درگاه لطفاً مجدداً درگاه را در بخش پیکربندی فعال نمایید. 42 44 = 1.4.1 = 43 45 * Delete nusaop class … … 54 56 55 57 == Changelog == 58 = 1.5 = 59 * Change Gateway ID form Melli to melli_gate 56 60 = 1.4.1 = 57 61 * Delete nusaop class
Note: See TracChangeset
for help on using the changeset viewer.