您好,欢迎访问一九零五行业门户网

Paypal线下支付模块,附下载地址_PHP教程

paypal线下支付模块
功能:
1,提供paypal线下支付选项,提示客户填写paypal邮箱账户,以便提交订单后联系客户
2,订单提交成功后自动发送邮件(包含paypal收款账户)给客户,并提示客户根据邮件操作
3,paypal自定义按照,后台功能可定制开发
本模块根据借用西联汇款邮件发送功能,而修改的paypal线下支付模块。本地测试功能完善,如有问题欢迎指出。
安装代码如下:
[php] 
code = 'ppoffline'; 
      $this->title = module_payment_ppoffline_text_title; 
      $this->description = module_payment_ppoffline_text_description; 
      $this->sort_order = module_payment_ppoffline_sort_order; 
      $this->enabled = ((module_payment_ppoffline_status == 'true') ? true : false);
if ((int)module_payment_ppoffline_order_status_id > 0) { 
        $this->order_status = module_payment_ppoffline_order_status_id; 
      }
if (is_object($order)) $this->update_status(); 
      $this->email_footer = 'our paypal email account:'.module_payment_ppoffline_paypal_email.','; //邮件通知发送paypal收款账户 
      $this->email_footer .= module_payment_ppoffline_text_email_footer; 
    }
// class methods 
function update_status() { 
      global $order, $db;
if ( ($this->enabled == true) && ((int)module_payment_ppoffline_zone > 0) ) { 
        $check_flag = false; 
        $check = $db->execute(select zone_id from . table_zones_to_geo_zones . where geo_zone_id = ' . module_payment_ppoffline_zone . ' and zone_country_id = ' . $order->billing['country']['id'] . ' order by zone_id); 
        while (!$check->eof) { 
          if ($check->fields['zone_id']             $check_flag = true; 
            break; 
          } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) { 
            $check_flag = true; 
            break; 
          } 
          $check->movenext(); 
        }
if ($check_flag == false) { 
          $this->enabled = false; 
        } 
      } 
    }
function javascript_validation() { 
      return false; 
    }
function selection() { 
     return array('id' => $this->code, 
                   'module' => module_payment_ppoffline_text_catalog_logo, 
                   'icon' => module_payment_ppoffline_text_catalog_logo 
                 ); 
   }
function pre_confirmation_check() { 
      return false; 
    }
function confirmation() { 
      return array('title' => module_payment_ppoffline_text_description); 
    }
function process_button() { 
      return false; 
    }
function before_process() { 
      return false; 
    }
function after_process() { 
      return false; 
    }
function get_error() { 
      return false; 
    }
function check() { 
        global $db; 
      if (!isset($this->_check)) { 
        $check_query = $db->execute(select configuration_value from . table_configuration . where configuration_key = 'module_payment_ppoffline_status'); 
        $this->_check = $check_query->recordcount(); 
      } 
      return $this->_check; 
    }
function install() { 
        global $db, $language; 
        if (!defined('module_payment_ppoffline_paypal_email')) include(dir_fs_catalog_languages . $_session['language'] . '/modules/payment/' . $this->code . '.php'); 
    $db->execute(insert into . table_configuration . (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values (' . module_payment_ppoffline_text_config_1_1 . ', 'module_payment_ppoffline_status', 'true', ' . module_payment_ppoffline_text_config_1_2 . ', '6', '1', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());); 
    $db->execute(insert into . table_configuration . (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values (' . module_payment_ppoffline_paypal_email . ', 'module_payment_ppoffline_paypal_email', '', '' , '6', '7', now());); 
    $db->execute(insert into . table_configuration . (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values (' . module_payment_ppoffline_receiver_phone . ', 'module_payment_ppoffline_receiver_phone', '', '' , '6', '8', now());); 
    $db->execute(insert into . table_configuration . (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values (' . module_payment_ppoffline_text_config_2_1 . ', 'module_payment_ppoffline_sort_order', '0', ' . module_payment_ppoffline_text_config_2_2 . ', '6', '0', now())); 
    $db->execute(insert into . table_configuration . (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values (' . module_payment_ppoffline_text_config_3_1 . ', 'module_payment_ppoffline_order_status_id', '0', ' . module_payment_ppoffline_text_config_3_2 . ', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())); 

    function remove() { 
        global $db; 
    $db->execute(delete from . table_configuration . where configuration_key in (' . implode(', ', $this->keys()) . '));
}
function keys() { 
      return array('module_payment_ppoffline_status' , 'module_payment_ppoffline_paypal_email', 'module_payment_ppoffline_receiver_phone', 'module_payment_ppoffline_sort_order','module_payment_ppoffline_order_status_id'); 
    } 
  } 
?> 
功能截图:
1,后台设置截图
2,付款方式选择
3,邮件通知
paypal线下支付下载地址
http://www.bkjia.com/uploadfile/2012/0910/20120910025514326.rar
安装插件不能用将includes/modules/payment/paypaloffline.php下的
第23行
class ppoffline  {
修改为
class paypaloffline  {
第27行
function ppoffline () {
修改为
function paypaloffline () {
第29行
$this->code = 'ppoffline';
修改成
$this->code = 'paypaloffline';
http://www.bkjia.com/phpjc/477985.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/477985.htmltecharticlepaypal线下支付模块 功能: 1,提供paypal线下支付选项,提示客户填写paypal邮箱账户,以便提交订单后联系客户 2,订单提交成功后自动发送...
其它类似信息

推荐信息