Plugin Directory

Changeset 2125636


Ignore:
Timestamp:
07/19/2019 07:58:38 AM (7 years ago)
Author:
ibrahimhasanov
Message:

payment options

Location:
uvibapay/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uvibapay/trunk/classes/WC_Gateway_UvibaPayment.php

    r2110707 r2125636  
    225225        'desc_tip'      => true,
    226226    ),
     227    'payments_card' => array(
     228        'title'         => __('Enable/Disable:', 'woo_uvibapay'),
     229        'type'          => 'checkbox',
     230        'label'         => __('Card payments', 'woo_uvibapay'),
     231        'default'       => 'yes',
     232    ),
     233    'payments_ach' => array(
     234        'title'         => __('Enable/Disable:', 'woo_uvibapay'),
     235        'type'          => 'checkbox',
     236        'label'         => __('Bank payments', 'woo_uvibapay'),
     237        'default'       => 'yes',
     238    ),
     239    'payments_paypal' => array(
     240        'title'         => __('Enable/Disable:', 'woo_uvibapay'),
     241        'type'          => 'checkbox',
     242        'label'         => __('Paypal payments', 'woo_uvibapay'),
     243        'default'       => 'yes',
     244    ),
    227245    // 'description' => array(
    228246    //     'title' => __( 'Customer Message', 'woocommerce' ),
     
    372390
    373391if($test_mode=='test'){
    374     $public_key = $this->settings['test_public_key'];
     392    $public_key = $this->settings['payments_card'];
    375393}else{
    376394    $public_key = $this->settings['live_public_key'];
    377395}
     396
     397$not_allowed_methods='';
     398if(!isset($this->settings['payments_card'])){
     399    $this->settings['payments_card']='yes';
     400}
     401if(!isset($this->settings['payments_ach'])){
     402    $this->settings['payments_ach']='yes';
     403}
     404if(!isset($this->settings['payments_paypal'])){
     405    $this->settings['payments_paypal']='yes';
     406}
     407
     408if($this->settings['payments_card']=='no'){
     409    $not_allowed_methods.='card,';
     410}
     411if($this->settings['payments_ach']=='no'){
     412    $not_allowed_methods.='ach,';
     413}
     414if($this->settings['payments_paypal']=='no'){
     415    $not_allowed_methods.='paypal,';
     416}
     417
    378418    return '<form id="current_uvi_form_id"  action="'.$redirect_url.'" method="post"  >'
    379419.implode('', $uvibapay_args_array).
     
    388428    data-name="'.$this->settings['store_name'].'"
    389429    data-image="'.$this->settings['image_url_of_store'].'"
     430    data-not_allowed_methods="'.$not_allowed_methods.'"
    390431    data-version="1"
    391432    data-wordpress="1"
  • uvibapay/trunk/index.php

    r2123364 r2125636  
    88Description: Accept Payments Online via pay.uviba.com
    99Author: Uviba LLC
    10 version: 1.3.2
     10version: 1.3.3
    1111
    1212*/
Note: See TracChangeset for help on using the changeset viewer.