search
Homephp教程php手册Paypal线下支付模块,附下载地址

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

Jun 13, 2016 am 10:52 AM
paypaldownloadFunctionaddresssupplyhintpaymoduleofflineOptions

paypal线下支付模块
功能:
1,提供Paypal线下支付选项,提示客户填写paypal邮箱账户,以便提交订单后联系客户
2,订单提交成功后自动发送邮件(包含paypal收款账户)给客户,并提示客户根据邮件操作
3,Paypal自定义按照,后台功能可定制开发
本模块根据借用西联汇款邮件发送功能,而修改的Paypal线下支付模块。本地测试功能完善,如有问题欢迎指出。
安装代码如下:
[php] 
  class ppoffline  { 
    var $code, $title, $description, $enabled; 
 
// class constructor 
    function ppoffline () { 
      global $order; 
      $this->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';

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.