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

ECSHOP 支付宝无商家支付

此功能用于ecshop无支付宝商家账号支付、并实现支付结果回写ecshop。此功能的目的是让那些无法申请支付宝商家支付接口的用户,可以通过支付宝进行收款,从而绕过支付宝商家认证。功能特点如下,1、抓取远程邮箱的支付宝交易记录。2、提取支付宝交易记录中的交
此功能用于ecshop无支付宝商家账号支付、并实现支付结果回写ecshop。此功能的目的是让那些无法申请支付宝商家支付接口的用户,可以通过支付宝进行收款,从而绕过支付宝商家认证。功能特点如下,1、抓取远程邮箱的支付宝交易记录。2、提取支付宝交易记录中的交易信息。3、将此交易信息匹配ecshop数据库中已存在订单,若匹配成功则直接修改订单状态、并且更新账户余额状态。最终完成无支付宝商家支付。
卓流应用网(http://360cd.cn/) 专业的ecmall、ecshop二次开发及服务 connect(); //if connection fails give error message and exit$tot = $obj->gettotalmails(); //total mails in inbox return integer value$mail_list=array();for($i=$tot;$i>0;$i--){ $head=$obj->getheaders($i); if($head['from']=='service@mail.alipay.com' ) { $mail_list[]= getinfo($obj->getbody($i)); } }$obj->close_mailbox(); $result= updateorder($mail_list);if($result){echo 支付未完成点此查看;}else{echo 支付成功点此跳转;}function updateorder($mail_list){ global $db,$ecs; if(is_array($mail_list) && count($mail_list)) { foreach($mail_list as $mail) { if(!empty($mail['order']) && !empty($mail['price'])) { $order=str_replace(:,'',$mail['order']); $account = array(); $account = $db->getrow(select * from .$ecs->table('user_account'). where out_sn = '.trim($order).'); if(is_array($account) && count($account)) { $price=str_replace(元,'',$mail['price']); $price=str_replace(:,'',$price); if(floatval($price)==floatval($account['amount']) && $account['is_paid']==0 ) { update_user_account($account['id'], $account['amount'], '系统自动充值', 1); log_account_change($account['user_id'], $account['amount'], 0, 0, 0, $_lang['surplus_type_1'], act_drawing); return 1; }else{ return 0; } }else{ return 0; } } } } return 0; }function update_user_account($id, $amount, $admin_note, $is_paid){ $sql = update .$globals['ecs']->table('user_account'). set . admin_user = '$_session[admin_name]', . amount = '$amount', . paid_time = '.gmtime().', . admin_note = '$admin_note', . is_paid = '$is_paid' where id = '$id'; return $globals['db']->query($sql);}function getinfo($content){ $content=strip_tags($content); $name_start=stripos($content,'商品名称'); $name_end=stripos($content,'交易对方'); $price_start=stripos($content,'购买总价'); $price_end=stripos($content,'卖家折扣'); if($name_start && $name_end && $price_end && $price_start) { $name_len=$name_end-($name_start+12); $price_len=$price_end-($price_start+12); $name=substr($content,$name_start+12,$name_len); $price=substr($content,$price_start+12,$price_len); } return array('order'=>$name,'price'=>$price);}?>
其它类似信息

推荐信息