Changeset 1834018
- Timestamp:
- 03/05/2018 09:45:34 PM (8 years ago)
- Location:
- bank-melli-edd-gateway
- Files:
-
- 102 added
- 1 deleted
- 3 edited
-
tags/1.2 (added)
-
tags/1.2/Melli_for_EDD.php (added)
-
tags/1.2/about.php (added)
-
tags/1.2/images (added)
-
tags/1.2/images/icon.png (added)
-
tags/1.2/images/logo.png (added)
-
tags/1.2/lib (added)
-
tags/1.2/lib/class.nusoap_base.php (added)
-
tags/1.2/lib/class.soap_fault.php (added)
-
tags/1.2/lib/class.soap_parser.php (added)
-
tags/1.2/lib/class.soap_server.php (added)
-
tags/1.2/lib/class.soap_transport_http.php (added)
-
tags/1.2/lib/class.soap_val.php (added)
-
tags/1.2/lib/class.soapclient.php (added)
-
tags/1.2/lib/class.wsdl.php (added)
-
tags/1.2/lib/class.wsdlcache.php (added)
-
tags/1.2/lib/class.xmlschema.php (added)
-
tags/1.2/lib/nusoap.php (added)
-
tags/1.2/lib/nusoapmime.php (added)
-
tags/1.2/melli.php (added)
-
tags/1.2/menu_setup.php (added)
-
tags/1.2/news.php (added)
-
tags/1.2/readme.txt (added)
-
tags/1.2/screenshot-1.png (added)
-
tags/1.2/screenshot-2.png (added)
-
tags/1.2/screenshot-3.png (added)
-
tags/1.3 (added)
-
tags/1.3/Melli_for_EDD.php (added)
-
tags/1.3/about.php (added)
-
tags/1.3/images (added)
-
tags/1.3/images/ESET-license-G.gif (added)
-
tags/1.3/images/icon.png (added)
-
tags/1.3/images/logo.png (added)
-
tags/1.3/images/wordpress-hosting.gif (added)
-
tags/1.3/lib (added)
-
tags/1.3/lib/class.nusoap_base.php (added)
-
tags/1.3/lib/class.soap_fault.php (added)
-
tags/1.3/lib/class.soap_parser.php (added)
-
tags/1.3/lib/class.soap_server.php (added)
-
tags/1.3/lib/class.soap_transport_http.php (added)
-
tags/1.3/lib/class.soap_val.php (added)
-
tags/1.3/lib/class.soapclient.php (added)
-
tags/1.3/lib/class.wsdl.php (added)
-
tags/1.3/lib/class.wsdlcache.php (added)
-
tags/1.3/lib/class.xmlschema.php (added)
-
tags/1.3/lib/nusoap.php (added)
-
tags/1.3/lib/nusoapmime.php (added)
-
tags/1.3/melli.php (added)
-
tags/1.3/menu_setup.php (added)
-
tags/1.3/news.php (added)
-
tags/1.3/readme.txt (added)
-
tags/1.3/screenshot-1.png (added)
-
tags/1.3/screenshot-2.png (added)
-
tags/1.3/screenshot-3.png (added)
-
tags/1.4 (added)
-
tags/1.4.1 (added)
-
tags/1.4.1/Melli_for_EDD.php (added)
-
tags/1.4.1/about.php (added)
-
tags/1.4.1/images (added)
-
tags/1.4.1/images/ESET-license-G.gif (added)
-
tags/1.4.1/images/icon.png (added)
-
tags/1.4.1/images/logo.png (added)
-
tags/1.4.1/images/wordpress-hosting.gif (added)
-
tags/1.4.1/lang (added)
-
tags/1.4.1/lang/ex_lang-fa_IR.mo (added)
-
tags/1.4.1/lang/ex_lang-fa_IR.po (added)
-
tags/1.4.1/melli.php (added)
-
tags/1.4.1/menu_setup.php (added)
-
tags/1.4.1/news.php (added)
-
tags/1.4.1/readme.txt (added)
-
tags/1.4.1/screenshot-1.png (added)
-
tags/1.4.1/screenshot-2.png (added)
-
tags/1.4.1/screenshot-3.png (added)
-
tags/1.4/Melli_for_EDD.php (added)
-
tags/1.4/about.php (added)
-
tags/1.4/images (added)
-
tags/1.4/images/ESET-license-G.gif (added)
-
tags/1.4/images/icon.png (added)
-
tags/1.4/images/logo.png (added)
-
tags/1.4/images/wordpress-hosting.gif (added)
-
tags/1.4/lib (added)
-
tags/1.4/lib/class.nusoap_base.php (added)
-
tags/1.4/lib/class.soap_fault.php (added)
-
tags/1.4/lib/class.soap_parser.php (added)
-
tags/1.4/lib/class.soap_server.php (added)
-
tags/1.4/lib/class.soap_transport_http.php (added)
-
tags/1.4/lib/class.soap_val.php (added)
-
tags/1.4/lib/class.soapclient.php (added)
-
tags/1.4/lib/class.wsdl.php (added)
-
tags/1.4/lib/class.wsdlcache.php (added)
-
tags/1.4/lib/class.xmlschema.php (added)
-
tags/1.4/lib/nusoap.php (added)
-
tags/1.4/lib/nusoapmime.php (added)
-
tags/1.4/melli.php (added)
-
tags/1.4/menu_setup.php (added)
-
tags/1.4/news.php (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/screenshot-1.png (added)
-
tags/1.4/screenshot-3.png (added)
-
trunk/Melli_for_EDD.php (modified) (16 diffs)
-
trunk/lang (added)
-
trunk/lang/ex_lang-fa_IR.mo (added)
-
trunk/lang/ex_lang-fa_IR.po (added)
-
trunk/lib (deleted)
-
trunk/menu_setup.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bank-melli-edd-gateway/trunk/Melli_for_EDD.php
r1576697 r1834018 1 1 <?php 2 /* *2 /* 3 3 Plugin Name: Bank Melli Iran EDD gateway 4 Version: 1.4 5 Description: این افزونه درگاه بانک ملی و شبکه پرداخت الکترونیک شاپرک را به افزونه فروش فایل EDD اضافه میکند.4 Version: 1.4.1 5 Description: Sadad payment gateway for Easy digital downloads(switch: 1). 6 6 Plugin URI: http://ham3da.ir/ 7 7 Author: Javad Ahshamian 8 Author URI: http ://ham3da.ir/8 Author URI: https://ham3da.ir/ 9 9 License: GPLv2 10 Tested up to: 4.5 11 **/ 10 Tested up to: 4.9.4 11 Text Domain: ex_lang 12 Domain Path: /lang 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 12 23 13 24 include "menu_setup.php"; … … 15 26 16 27 if (!defined('ABSPATH') ) { 17 echo "HAM3DA"; 18 exit; 19 } 20 21 if(class_exists("nusoap_base")== false) 22 { 23 require_once('lib/nusoap.php'); 24 } 25 26 @session_start(); 28 die("Access Denied"); 29 } 30 31 27 32 /////------------------------------------------------ 28 33 function edd_bmi_rial ($formatted, $currency, $price) { 29 34 30 return $price . ' ریال';35 return $price . __(' Rial', 'ex_lang'); 31 36 } 32 37 add_filter( 'edd_rial_currency_filter_after', 'edd_bmi_rial', 10, 3 ); 33 38 /////------------------------------------------------ 34 39 function bmi_add_gateway($gateways) { 35 $gateways['Melli'] = array('admin_label' => 'درگاه بانک ملی ایران', 'checkout_label' => 'بانک ملی ایران');40 $gateways['Melli'] = array('admin_label' => __('Sadad Payment Gateway', 'ex_lang'), 'checkout_label' => __('Sadad Payment Gateway', 'ex_lang')); 36 41 return $gateways; 37 42 } … … 47 52 { 48 53 //error_reporting(0); 54 @session_start(); 49 55 $site_title = get_bloginfo( 'name' ); 50 56 $request_form1 = '<html dir=rtl> … … 52 58 <meta http-equiv="Content-Language" content="fa"> 53 59 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 54 <title>' .$site_title.'</title>60 <title>' . $site_title . '</title> 55 61 </head> 56 <body> 57 <center> 58 <div style= "border: 1px solid #CCC;font-family:Tahoma;font-size: 12; background-color:#fafafa; width:480px;"> 62 <body><center> 63 <div style= "border: 1px solid #CCC;font-family:Tahoma;font-size: 12; background-color:#fafafa; width:98%;"> 59 64 <font color="black" size=4 px> 60 65 <p/> 61 <br/> در حال انتقال به درگاه بانکی ...<br>62 <br/> لطفاً صبور باشید ...<br>66 <br/>'.__('Connecting to the payment Gateway...', 'ex_lang').'<br> 67 <br/>'.__('Please wait...', 'ex_lang') .'<br> 63 68 </font></div> 64 69 </center>'; … … 69 74 if ($client->fault) 70 75 { 71 edd_set_error( 'pay_00', 'P00:خطایی در اتصال پیش آمد،مجدد تلاش کنید...');76 edd_set_error( 'pay_00', __('An error occurred while connecting to the payment gateway[code: 00].', 'ex_lang') ); 72 77 edd_send_back_to_checkout('?payment-mode=' . $purchase_data['post_data']['edd-gateway']); 73 78 exit(); … … 110 115 $PayResult = $client->PaymentUtility($Melli_MerchantID, $amount, $orderId, $Melli_Password, $Melli_Terminal_ID, $return); 111 116 112 113 117 ///************END of PAY REQUEST***************/// 114 118 // Successfull Pay Request … … 117 121 $_SESSION['req'] = $PayResult['RequestKey']; 118 122 $FormStr = $PayResult['PaymentUtilityResult']; 123 //var_dump($PayResult); 119 124 die($request_form1.$FormStr. 120 '<script type="text/javascript" language="JavaScript">125 '<script type="text/javascript"> 121 126 document.getElementById("paymentUTLfrm").submit(); 122 127 </script></form></body></html>'); … … 126 131 127 132 edd_update_payment_status($payment, 'failed'); 128 edd_insert_payment_note( $payment, 'P02: خطا در اتصال به بانک');129 edd_set_error( 'pay_02', ':P02: خطا در اتصال به بانک');133 edd_insert_payment_note( $payment, __('Error connecting to payment gateway.[code: 02]', 'ex_lang')); 134 edd_set_error( 'pay_02', __('Error connecting to payment gateway.[code: 02]', 'ex_lang')); 130 135 edd_send_back_to_checkout('?payment-mode=' . $purchase_data['post_data']['edd-gateway']); 131 136 } … … 134 139 else 135 140 { 136 edd_set_error( 'pay_01', 'P01:خطا در ایجاد پرداخت، لطفاً مجدداً تلاش کنید...');141 edd_set_error( 'pay_01', __('Error creating payment, please try again' , 'ex_lang')); 137 142 edd_send_back_to_checkout('?payment-mode=' . $purchase_data['post_data']['edd-gateway']); 138 143 } … … 143 148 function bmi_verify() 144 149 { 150 @session_start(); 145 151 //error_reporting(0); 146 152 global $edd_options; … … 168 174 if ($client->fault) 169 175 { 170 edd_set_error( 'ver_0 0', 'V00:تراکنش ناموفق بود.<br>اگر وجهی از حساب شما کسر شده باشد، تا پایان روز جاری به حساب شما باز خواهد گشت.');176 edd_set_error( 'ver_03', __('Transaction unsuccessful. if the amount of your bank account has been reduced. Until the end of today, your account will be refunded[code: 03].', 'ex_lang')); 171 177 edd_update_payment_status($_SESSION['Melli_payment'], 'failed'); 172 edd_insert_payment_note( $_SESSION['Melli_payment'], 'V00:'.'<pre>خطا در تاییدیه بانک</pre>');178 edd_insert_payment_note( $_SESSION['Melli_payment'], __('Error in Bank Verification[code: 03]' , 'ex_lang')); 173 179 edd_send_back_to_checkout('?payment-mode=Melli'); 174 180 … … 216 222 { 217 223 218 edd_set_error( 'rev_0 0', 'R00:تراکنش ناموفق بود.<br>اگر وجهی از حساب شما کسر شده باشد، تا پایان روز جاری به حساب شما باز خواهد گشت.');224 edd_set_error( 'rev_04', __('Transaction unsuccessful. if the amount of your bank account has been reduced. Until the end of today, your account will be refunded[code: 04].', 'ex_lang')); 219 225 edd_update_payment_status($_SESSION['Melli_payment'], 'failed'); 220 edd_insert_payment_note( $_SESSION['Melli_payment'], 'R0 0:'.'<pre>'.$err_msg.'</pre>' );226 edd_insert_payment_note( $_SESSION['Melli_payment'], 'R04:'.'<pre>'.$err_msg.'</pre>' ); 221 227 edd_send_back_to_checkout('?payment-mode=Melli'); 222 228 } … … 229 235 $do_publish = false; 230 236 edd_update_payment_status($payment, 'publish'); 231 edd_insert_payment_note( $payment, 'شماره تراکنش:'.$TraceNo);232 echo "<script type='text/javascript'>alert('کد تراکنش خرید بانک : ".$TraceNo."');</script>";237 edd_insert_payment_note( $payment, __('Transaction Number:', 'ex_lang').$TraceNo); 238 //echo "<script type='text/javascript'>alert('کد تراکنش خرید بانک : ".$TraceNo."');</script>"; 233 239 } 234 240 } … … 240 246 array ( 241 247 'id' => 'Melli_settings', 242 'name' => '<strong>پيکربندي درگاه بانک ملی</strong><br>(در حالت آزمایشی این قسمت را تکمیل نکنید)',243 'desc' => ' پيکربندي درگاه بانک ملی ایران با تنظيمات فروشگاه',248 'name' => __('<b>Sadad Gateway Settings</b><br>Do not complete in the test mode', 'ex_lang'), 249 'desc' => '', 244 250 'type' => 'header' 245 251 ), 246 252 array ( 247 253 'id' => 'Melli_MerchantID', 248 'name' => 'شماره پذیرنده',254 'name' => __('Merchant ID', 'ex_lang'),//شماره پذیرنده 249 255 'desc' => '', 250 256 'type' => 'text', … … 253 259 array ( 254 260 'id' => 'Melli_Terminal_ID', 255 'name' => 'شماره ترمینال',261 'name' => __('Terminal ID', 'ex_lang'),//شماره ترمینال 256 262 'desc' => '', 257 263 'type' => 'text', … … 260 266 array ( 261 267 'id' => 'Melli_Password', 262 'name' => 'رمز عبور',268 'name' => __('Password', 'ex_lang'),//رمز 263 269 'desc' => '', 264 270 'type' => 'text', -
bank-melli-edd-gateway/trunk/menu_setup.php
r1371538 r1834018 8 8 { 9 9 10 add_menu_page( '<span>بانک ملی ایران</span>', '<span>بانک ملی ایران</span>', 'activate_plugins', "melli_bank_gate", 'bmi_load_inteface', plugin_dir_url( __FILE__ ).'/images/icon.png');11 add_submenu_page("melli_bank_gate", '<span>درباره ما</span>', '<span>درباره ما</span>', 'activate_plugins', "melli_bank_gate_about", "bmi_load_about");12 add_submenu_page("melli_bank_gate", '<span>خبرنامه</span>', '<span>خبرنامه</span>', 'activate_plugins', "melli_bank_gate_news", "bmi_load_news");10 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'); 11 add_submenu_page("melli_bank_gate", __('About', 'ex_lang'), __('About', 'ex_lang'), 'activate_plugins', "melli_bank_gate_about", "bmi_load_about"); 12 add_submenu_page("melli_bank_gate", __('Newsletters', 'ex_lang'), __('Newsletters', 'ex_lang'), 'activate_plugins', "melli_bank_gate_news", "bmi_load_news"); 13 13 14 14 } -
bank-melli-edd-gateway/trunk/readme.txt
r1576697 r1834018 4 4 Author URI: http://ham3da.ir/ 5 5 Donate link: http://ham3da.ir/ 6 Tags: bank melli, melli, easy digital downloads, EDD gateways,درگاه بانک ملی,بانک ملی 6 Tags: bank melli, melli, easy digital downloads, EDD gateways,درگاه بانک ملی,بانک ملی, درگاه بانک ملی برای edd 7 7 Requires at least: 3.0 8 Tested up to: 4. 7.19 Stable tag: 4. 7.18 Tested up to: 4.9.4 9 Stable tag: 4.9.4 10 10 License: GPLv2 11 11 … … 37 37 38 38 == Donations == 39 You can Donate plugin author here http ://proappco.com/payment/39 You can Donate plugin author here https://ham3da.ir/payment/ 40 40 41 41 == Upgrade Notice == 42 = 1.4.1 = 43 * Delete nusaop class 44 * Use soap instead of nusoap 45 * Add standard translation 42 46 = 1.4 = 43 47 * Update nusaop class … … 50 54 51 55 == Changelog == 56 = 1.4.1 = 57 * Delete nusaop class 58 * Use soap instead of nusoap 59 * Add standard translation 52 60 = 1.4 = 53 61 * Update nusaop class
Note: See TracChangeset
for help on using the changeset viewer.