Plugin Directory

Changeset 2587622


Ignore:
Timestamp:
08/24/2021 09:47:21 AM (5 years ago)
Author:
ksherdev
Message:

Add instal fee payer.

Location:
ksher-payment
Files:
34 added
3 edited

Legend:

Unmodified
Added
Removed
  • ksher-payment/trunk/ksher.php

    r2580103 r2587622  
    44    * Plugin URI:  https://www.ksher.com
    55    * Description: Ksher Gateway Plugin is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Ksher Payment Gateway payment method to WooCommerce.
    6     * Version:     1.0.5
     6    * Version:     1.0.6
    77    * Author:      Ksher
    88    * Text Domain: ksher
  • ksher-payment/trunk/payment/set-payment.php

    r2580130 r2587622  
    6969                    $this->ktccard = $this->get_option( 'ktccard' );
    7070                    $this->ktc_instal = $this->get_option( 'ktc_instal' );
     71          $this->instal_fee_payer = $this->get_option( 'instal_fee_payer' );
    7172                    $this->savecard = $this->get_option( 'savecard' );
    7273
     
    146147                            'default'     => 'no'
    147148                        ),
     149                        'savecard' => array(
     150                            'title'       => 'Save Card',
     151                            'label'       => 'Enable save card for credit card(KTB Card)',
     152                            'type'        => 'checkbox',
     153                            'description' => '',
     154                            'default'     => 'yes',
     155                        ),
    148156                        'ktc_instal' => array(
    149157                            'title'       => 'KTC installment',
     
    153161                            'default'     => 'no',
    154162                        ),
    155                         'savecard' => array(
    156                             'title'       => 'Save Card',
    157                             'label'       => 'Enable Savecard for Credit Card(KTB Card)',
    158                             'type'        => 'checkbox',
    159                             'description' => '',
    160                             'default'     => 'yes',
     163                        'instal_fee_payer' => array(
     164                            'title'       => 'KTC installment Fee Payer',
     165                            'label'       => 'The merchant bears the installment fee',
     166                            'type'        => 'checkbox',
     167                            'description' => '',
     168                            'default'     => 'no',
    161169                        ),
    162170                    );
     
    323331                    }
    324332
     333                    if ($this->ktc_instal == 'yes') {
     334                        if ($this->instal_fee_payer == 'yes') {
     335                            $data['instal_fee_payer'] = 2;
     336                        } else if ($this->instal_fee_payer == 'no') {
     337                            $data['instal_fee_payer'] = 1;
     338                        }
     339                    }
     340
    325341                    if ( get_option('ksher_logo') && is_string(get_option('ksher_logo'))) {
    326342                        $data['logo'] = get_option('ksher_logo');
     
    350366
    351367                            if ($verify) {
    352                                 $check =  json_encode($data, true);
    353 
    354                                 error_log(print_r( $check, true));
     368                                //$check =  json_encode($data, true);
     369                                //error_log(print_r( $check, true));
     370
    355371                                return array(
    356372                                    'result' => 'success',
  • ksher-payment/trunk/readme.txt

    r2580103 r2587622  
    22221.0.1
    2323Add Feature color and logo
    24 
    25 1.0.5
    26 Add KTC Installment Payment
Note: See TracChangeset for help on using the changeset viewer.