Plugin Directory

Changeset 1923933


Ignore:
Timestamp:
08/13/2018 09:08:32 AM (8 years ago)
Author:
ham3da
Message:

پس از به روز رسانی به دلیل تغییر شناسه درگاه، لطفاً مجدداً درگاه را در بخش پیکربندی فعال نمایید.

Location:
bank-melli-edd-gateway
Files:
18 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • bank-melli-edd-gateway/trunk/Melli_for_EDD.php

    r1834018 r1923933  
    22/*
    33    Plugin Name: Bank Melli Iran EDD gateway
    4     Version: 1.4.1
     4    Version: 1.5
    55    Description:  Sadad payment gateway for Easy digital downloads(switch: 1).
    66    Plugin URI: http://ham3da.ir/
     
    1212    Domain Path: /lang
    1313 */
    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 
    2715if (!defined('ABSPATH') ) {
    2816    die("Access Denied");
    2917}
    3018
     19add_action('plugins_loaded', 'edd_sadad1_load_textdomain');
     20
     21function edd_sadad1_load_textdomain()
     22{
     23    load_plugin_textdomain('ex_lang', false, basename(dirname(__FILE__)) . '/lang');
     24}
     25
     26add_action('admin_menu', 'bmi_setMenu');
     27   
     28function 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
     37function bmi_load_inteface(  )
     38{
     39    include dirname(__file__)."/melli.php";
     40}
     41function bmi_load_about(  )
     42{
     43    include dirname(__file__)."/about.php";
     44}
     45function bmi_load_news(  )
     46{
     47    include dirname(__file__)."/news.php";
     48}
    3149
    3250/////------------------------------------------------
     
    3755add_filter( 'edd_rial_currency_filter_after', 'edd_bmi_rial', 10, 3 );
    3856/////------------------------------------------------
    39 function bmi_add_gateway($gateways) {
    40     $gateways['Melli'] = array('admin_label' => __('Sadad Payment Gateway', 'ex_lang'), 'checkout_label' => __('Sadad Payment Gateway', 'ex_lang'));
     57function bmi_add_gateway($gateways)
     58{
     59    $gateways['melli_gate'] = array('admin_label' => __('Sadad Payment Gateway', 'ex_lang'), 'checkout_label' => __('Sadad Payment Gateway', 'ex_lang'));
    4160    return $gateways;
    4261}
    4362add_filter( 'edd_payment_gateways', 'bmi_add_gateway' );
    4463
    45 function bmi_cc_form () {
     64function bmi_cc_form ()
     65{
    4666    do_action( 'bmi_cc_form_action' );
    4767}
    48 add_filter( 'edd_Melli_cc_form', 'bmi_cc_form' );
     68add_filter( 'edd_melli_gate_cc_form', 'bmi_cc_form' );
    4969
    5070/////-------------------------------------------------
     
    104124        $_SESSION['Melli_payment'] = $payment;
    105125        $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']));
    107127        $amount = $purchase_data['price'];
    108128        $localDate = date("Ymd");
     
    143163    }
    144164}
    145 add_action('edd_gateway_Melli', 'bmi_process_payment');
     165add_action('edd_gateway_melli_gate', 'bmi_process_payment');
    146166
    147167/////----------------------------------------------------
     
    157177
    158178   
    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))
    160180    {
    161181          $payment = $_SESSION['Melli_payment'];
     
    345365    return $tmess.$ErrorDesc;
    346366}
    347 ?>
  • bank-melli-edd-gateway/trunk/readme.txt

    r1834018 r1923933  
    4040
    4141== Upgrade Notice ==
     42= 1.5 =
     43* به دلیل تغییر شناسه درگاه لطفاً مجدداً درگاه را در بخش پیکربندی فعال نمایید.
    4244= 1.4.1 =
    4345* Delete nusaop class
     
    5456
    5557== Changelog ==
     58= 1.5 =
     59* Change Gateway ID form Melli to melli_gate
    5660= 1.4.1 =
    5761* Delete nusaop class
Note: See TracChangeset for help on using the changeset viewer.