Plugin Directory

Changeset 2760840


Ignore:
Timestamp:
07/24/2022 04:55:43 PM (4 years ago)
Author:
pamjad
Message:

Fixed CLASS NAME

File:
1 edited

Legend:

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

    r2760631 r2760840  
    22/*
    33 * Plugin Name: Bank Saman EDD gateway
    4  * Version: 3.0
     4 * Version: 3.1
    55 * Description: Add Bank Saman gateway to easy digital downloads
    6  * Plugin URI: https://pamjad.me/saman-getway-edd
     6 * Plugin URI: https://arvandec.com/wordpress-plugin/
    77 * Author: Pouriya Amjadzadeh
    88 * Author URI: https://pamjad.me
    99 * Donate link: https://pamjad.me/donate
    1010 * Tags: easy digital downloads,EDD gateways,persian banks,getaway
    11  * Requires PHP: 7.0
     11 * Requires PHP: 7.4
    1212 * Requires at least: 5.1
    1313 * Tested up to: 6.0.1
     
    1818
    1919if ( ! defined( 'ABSPATH' ) ) exit;
     20
     21add_action('init', function(){
     22    load_plugin_textdomain( 'sb24_edd', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' );
     23});
     24
    2025if ( !class_exists( 'EDD_BankSaman_Gateway' ) ) :
    2126
     
    2429
    2530        public function __construct() {
    26             add_action('init', function(){
    27                 load_plugin_textdomain( 'sb24_edd', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' );
    28             });
    2931            //Persian Currencies
    3032            add_filter( 'edd_currencies', array($this, 'add_tomain_currency'), 10 );
     
    131133
    132134            if ( $payment ) {
    133                 if( edd_is_test_mode()) {
    134                     edd_update_payment_status( $payment->ID, 'publish' );
     135                if( edd_is_test_mode() ) {
     136                    edd_update_payment_status( $payment->ID, 'complated' );
    135137                    edd_send_to_success_page();
    136138                } else {
     
    139141                    $Amount         = intval( $purchase_data['price'] ) ;
    140142                    if ( edd_get_currency() == 'IRT' ) $Amount *= 10;
    141 
    142143                    echo "<form id='samanpeyment' action='https://sep.shaparak.ir/payment.aspx' method='post'>
    143144                        <input type='hidden' name='Amount' value='{$Amount}' />
     
    200201endif;
    201202
    202 new EDD_sb24_Gateway;
     203new EDD_BankSaman_Gateway;
    203204
    204205?>
Note: See TracChangeset for help on using the changeset viewer.