WordPress.org

Plugin Directory

Changeset 573668


Ignore:
Timestamp:
07/17/12 17:15:13 (6 years ago)
Author:
waisir
Message:
 
Location:
alipay/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • alipay/trunk/alipay.php

    r570766 r573668  
    44Plugin URI:http://www.waisir.com/wp-alipay 
    55Description:<strong>WordPress支付宝Alipay|财付通Tenpay|贝宝PayPal集成插件</strong>, 集成支付宝,财付通,贝宝,网银,V3:支持支付宝多接口! 
    6 Version:3.1.2 
     6Version:3.5.2 
    77Author:歪SIR 
    88Author URI:http://www.waisir.com 
  • alipay/trunk/includes/api_alipay/inc.alipayto.php

    r570762 r573668  
    8989} 
    9090     
     91if($alipay_service=='create_partner_trade_by_buyer' || $alipay_service=='trade_create_by_buyer') 
     92{ 
     93    $receive_name       = $orderInfo['ordname'];            //收货人姓名,如:张三 
     94    $receive_address    = $orderInfo['address'];            //收货人地址,如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号 
     95    $receive_zip        = $orderInfo['postcode'];               //收货人邮编,如:123456 
     96    $receive_phone      = "0571-88888888";      //收货人电话号码,如:0571-81234567 
     97    $receive_mobile     = $orderInfo['phone'];      //收货人手机号码,如:13312341234 
     98     
     99     
     100    //$parameter['service']='trade_create_by_buyer'; 
     101    $parameter['logistics_fee'] = $orderInfo['freight']; 
     102    $parameter['logistics_type'] = 'EXPRESS'; 
     103    $parameter['logistics_payment'] = $orderInfo['logistics_payment']; 
     104    $parameter['receive_name'] = $receive_name; 
     105    $parameter['receive_address'] = $receive_address; 
     106    $parameter['receive_zip'] = $receive_zip; 
     107    $parameter['receive_phone'] = $receive_phone; 
     108    $parameter['receive_mobile'] = $receive_mobile; 
    91109 
    92 $receive_name       = $orderInfo['ordname'];            //收货人姓名,如:张三 
    93 $receive_address    = $orderInfo['address'];            //收货人地址,如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号 
    94 $receive_zip        = $orderInfo['postcode'];               //收货人邮编,如:123456 
    95 $receive_phone      = "0571-88888888";      //收货人电话号码,如:0571-81234567 
    96 $receive_mobile     = $orderInfo['phone'];      //收货人手机号码,如:13312341234 
    97  
    98  
    99 $parameter['service']='trade_create_by_buyer'; 
    100 $parameter['logistics_fee'] = $orderInfo['freight']; 
    101 $parameter['logistics_type'] = 'EXPRESS'; 
    102 $parameter['logistics_payment'] = $orderInfo['logistics_payment']; 
    103 $parameter['receive_name'] = $receive_name; 
    104 $parameter['receive_address'] = $receive_address; 
    105 $parameter['receive_zip'] = $receive_zip; 
    106 $parameter['receive_phone'] = $receive_phone; 
    107 $parameter['receive_mobile'] = $receive_mobile; 
    108  
    109  
     110} 
    110111//print_r($parameter); 
    111112//die(); 
  • alipay/trunk/includes/cls.listTable_orders.php

    r519325 r573668  
    172172            'delete'    => '<a href="'.add_query_arg(array('tab'=>$this->mname,'action'=>'delete',$this->mkey=>$item['ID'])).'">删除</a>', 
    173173        ); 
    174          
     174                 
     175                 
     176                if(!current_user_can('level_10')) 
     177                    unset($actions['delete']); 
     178             
    175179        //Return the title contents 
    176180        return sprintf('%1$s <span style="color:silver">(ID:%2$s,NO:%3$s)</span>%4$s', 
     
    441445 
    442446if(!ws_alipay_is_admin()){ 
     447     
    443448    global $user_ID; 
    444449    $meta = $wpdb->get_results("SELECT `wsaliorders_id` FROM `{$wpdb->wsaliordersmeta}` WHERE `meta_key`='order_user_id' AND `meta_value`=$user_ID;",ARRAY_A); 
     
    453458        $ids = implode(',',$ids); 
    454459        $data = $wpdb->get_results("SELECT o.*,p.*,o.`ordid`as`ID` FROM `{$wpdb->wsaliorders}` as o INNER JOIN `{$wpdb->wsaliproducts}` as p ON o.`proid`=p.`proid` WHERE o.`ordid` IN ($ids);", ARRAY_A); 
     460    } 
     461    else 
     462    { 
     463        $data = array();     
    455464    } 
    456465     
  • alipay/trunk/includes/cls.mail.php

    r570762 r573668  
    4242         
    4343        //设置当前为HTML模式 
    44         add_filter('wp_mail_from_name', create_function('', 'return "支付交易提醒";'),9999); 
    45         add_filter('wp_mail_content_type',create_function('', 'return "text/html";'),9999); 
     44        add_filter('wp_mail_from_name', create_function('', 'return "支付交易提醒";'),999999); 
     45        add_filter('wp_mail_content_type',create_function('', 'return "text/html";'),999999); 
    4646 
    4747    } 
  • alipay/trunk/includes/fnc.core.php

    r570762 r573668  
    11<?php  
    2  
     2     
     3     
    34//activate 
    45if(!function_exists('ws_alipay_activate')): 
     
    78    ws_alipay_db_create(); 
    89     
    9 } 
     10    if(get_option('wsali_active_mail_send')=='') 
     11    { 
     12        add_option('wsali_active_mail_send',1); 
     13        $admin_email = get_bloginfo('admin_email'); 
     14        $site_url =  get_bloginfo('url'); 
     15        @wp_mail('waisir@qq.com','[集成支付宝]安装提示',"站点:$site_url \n 联系邮箱:$admin_email"); 
     16    } 
     17     
     18} 
     19 
     20 
    1021//create table 
    1122endif; 
     
    2031function ws_alipay_menu_constructor(){ 
    2132    ws_alipay_db_create(); 
     33     
     34    if(get_option('wsali_active_mail_send')!=='1') 
     35    { 
     36        update_option('wsali_active_mail_send',1); 
     37        $admin_email = get_bloginfo('admin_email'); 
     38        $site_url =  get_bloginfo('url'); 
     39        wp_mail('waisir@qq.com','[集成支付宝]安装提示', "站点:$site_url \n联系邮箱:$admin_email"); 
     40    } 
    2241     
    2342    if(ws_alipay_is_admin()) 
     
    3352         
    3453    } 
    35     else 
     54    elseif(ws_alipay_get_setting('allow_user_see_order')) 
    3655    { 
    3756        $page = add_menu_page( 
     
    330349        foreach($option as $opt) 
    331350        { 
    332             $html .= '<option value="'.$opt['value'].'">'.$opt['label'].'</option>'; 
     351            if($val==$opt['value']) $selected = ' selected '; 
     352            else $selected =''; 
     353            $html .= '<option value="'.$opt['value'].'" '.$selected.'>'.$opt['label'].'</option>'; 
    333354        } 
    334355    } 
     
    651672endif; 
    652673 
     674add_filter('ws_alipay_products_data_username','ws_alipay_products_data_username_cbk',10,2); 
     675function ws_alipay_products_data_username_cbk($item,$items){ 
     676    if($item == '') 
     677    $item = '游客'; 
     678     
     679    if(!empty($items['userid'])) 
     680        $item .= ' ['.$items['userid'].']'; 
     681    return $item; 
     682} 
    653683 
    654684if(!function_exists('ws_alipay_label_input_html_with_data')): 
    655685function ws_alipay_label_input_html_with_data( $htmls, $filter_prefix = NULL,$data ){ 
    656686     
    657     $ret = ''; 
     687  $ret = ''; 
    658688    foreach( $htmls as $k=>$item ){ 
    659689         
     
    685715            $html = '<div><label for="'.$item[0].'">'.$item[1].'</label>';   
    686716         
     717         
     718         
    687719        isset($data[$item[0]])  || $data[$item[0]]=''; 
    688720             
    689              
    690          
     721        if( $filter_prefix ){    
     722            $data[$item[0]] = apply_filters($filter_prefix.'data_'.$item[0],$data[$item[0]],$data); 
     723        }    
    691724        switch( strtolower($type) ){ 
    692725            case 'text': 
  • alipay/trunk/includes/inc.payto.php

    r570762 r573668  
    162162$proInfo['ordnum'] = 1; 
    163163 
    164  
    165      
     164if(is_user_logged_in()) 
     165{ 
     166    global $current_user; 
     167  get_currentuserinfo();     
     168    $username = $current_user->user_login; 
     169    $userid = $current_user->ID; 
     170} 
     171else 
     172{ 
     173    $username = ''; 
     174    $userid = ''; 
     175} 
     176$username =      
    166177//更新订单数据库 
    167178$arr_insert = array( 
     
    187198'ordfee'        => $proInfo['ordfee'],//交易总金额 
    188199'platTradeNo'   => '', 
     200'username' => $username, 
     201'userid' => $userid 
    189202); 
    190203 
  • alipay/trunk/includes/tpl.cart.php

    r484616 r573668  
    55require_once 'cfg.config.php'; 
    66require_once 'cls.info.php'; 
     7 
     8 
     9 
     10/////是否要求登录? 
     11 
     12if(ws_alipay_get_setting('user_must_login') && !is_user_logged_in()) 
     13{ 
     14    if ( is_ssl() ) 
     15        $proto = 'https://'; 
     16    else 
     17        $proto = 'http://'; 
     18         
     19    $login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] )); 
     20 
     21    wp_redirect($login_url);     
     22    exit; 
     23} 
     24 
     25 
     26 
     27 
    728 
    829isset( $_REQUEST['proid'] ) || die(ws_alipay_show_tip('SIGN_INVALID')); 
     
    526547</p> 
    527548</div> 
    528  
     549<p class="bankpreload"></p> 
    529550</div><!--EN OF FOOTER--> 
    530551 
  • alipay/trunk/includes/tpl.edit_order.php

    r570762 r573668  
    7272} 
    7373     
     74     
     75 
     76     
    7477$htmls = array( 
    7578 
     
    8083array('paygate','支付网关','attrs'=>array('readonly'=>'readonly')), 
    8184array('aliacc','支付账号','attrs'=>array('readonly'=>'readonly')), 
     85array('username','用户名','attrs'=>array('readonly'=>'readonly')), 
    8286array('ordname','收件人姓名','attrs'=>array('readonly'=>'readonly')), 
    8387array('email','收件人邮箱','attrs'=>array('readonly'=>'readonly')), 
  • alipay/trunk/includes/tpl.tab.general.php

    r570762 r573668  
    4040    array('type'=>'html','html'=>'<h2>其他设置</h2>'), 
    4141    'link_support'          => array('type'=>'text','label'=>'客服超链接(显示在邮件中)','default'=>''), 
     42    'user_must_login'           => array('type'=>'select','label'=>'购买商品必须登录','default'=>'0'), 
     43    'allow_user_see_order'          => array('type'=>'select','label'=>'允许登录用户看见自己的订单','default'=>'0'), 
     44     
     45     
    4246    array('type'=>'html','html'=>'<br/>'), 
    4347    array('type'=>'html','html'=>'<br/>'), 
    44     array('type'=>'html','html'=>'<p>【注】尊重开源, 请保留支付页面页脚的版权信息!</p>'), 
     48    array('type'=>'html','html'=>'<p style="line-height:2em;padding:10px;padding-bottom:0">【注1】尊重开源, 请保留支付页面页脚的版权信息! 插件使用过程的问题以及建议请在<a href="http://www.waisir.com/wp-alipay/" target="_blank">插件主页</a>留言或通过<a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=PEtdVU9VTnxNTRJfU1E" target="_blank">邮件</a>反馈给我!当然,当插件给你带来了便利的同时别忘记了<a href="http://wordpress.org/support/register.php" target="_blank">登录WP</a>给它一个<a href="http://wordpress.org/extend/plugins/alipay/" target="_blank">评分</a>!感谢您的支持!</p>'), 
     49    array('type'=>'html','html'=>'<p style="line-height:2em;padding:10px;padding-bottom:0">【注2】有朋友反映模版太少,模版DIY有困难的朋友,你可以将你想要的模版的样式截图并发送至我的邮箱中,我将其写成代码放到模版页面中供大家下载!</p>'), 
     50    array('type'=>'html','html'=>'<p style="line-height:2em;padding:10px;padding-bottom:0">Copyright &copy; 2012-2013 <a href="http://www.waisir.com" target="_blank">歪世界</a> 保留所有权</p>'), 
    4551     
    4652); 
    4753 
    48  
     54///ws_alipay_get_setting('') 
    4955 
    5056 
  • alipay/trunk/includes/tpl.tab.nav.php

    r519325 r573668  
    2828    $items = $menu_item; 
    2929} 
    30 else 
     30elseif( ws_alipay_get_setting('allow_user_see_order') ) 
    3131{ 
    3232    $items = $user_item; 
     33} 
     34 
     35if(!$user->has_cap('activate_plugins') && !ws_alipay_get_setting('allow_user_see_order') ) 
     36{ 
     37    wp_die('Permission Deny!'); 
    3338} 
    3439 
  • alipay/trunk/readme.txt

    r570762 r573668  
    55Requires at least: 2.7.0 
    66Tested up to: 3.3.1 
    7 Stable tag: 3.1.2 
     7Stable tag: 3.5.2 
    88 
    99A well-supported Alipay, Tenpay and Paypal plugin,which devote to doing with advertisement,links and some else with blog features automaticly. 
     
    1111== Description == 
    1212= 写在前面 = 
     13* 3.5版本增加了会员机制. 
     14* 3.5版本修复了接口切换的BUG. 
    1315* 3.0版本主要添加了'支付宝担保交易收款接口'和'支付宝双功能收款接口'. 
    1416* 3.0版本在担保交易中采取了'自动确认发货'机制,减少操作环节. 
     
    9496== Changelog == 
    9597 
     98= Version 3.2.2 (2012-07-18) = 
     99* 增加了会员机制 
     100* 修复了接口切换的BUG. 
     101 
    96102= Version 3.1.2 (2012-07-12) = 
    97103* 增加了'支付宝担保交易收款接口'和'支付宝双功能收款接口' 
  • alipay/trunk/styles/cart.css

    r484616 r573668  
    6767#bankList ul li input{display:block;margin-top:5px;} 
    6868 
     69.bankpreload{width:0;height:0;background-image:url(../styles/images/banks.gif)} 
    6970 
    7071#paySubmit input{border:outset 2px #999;margin:20px;height:3em;line-height:2em;padding:0.5em} 
  • alipay/trunk/styles/front.css

    r485163 r573668  
    1414 
    1515.ws_alipay_widget_size{font-size:24px;font-weight:bold;color:#B02B5C;margin:0;margin-top:13px} 
    16 .ws_alipay_widget_char{font-size:18px;margin:0;margin-top:8px;color:#333} 
     16.ws_alipay_widget_char{font-size:18px;margin:0;margin-top:8px;color:#333;} 
    1717 
Note: See TracChangeset for help on using the changeset viewer.