无限星辰工作室-客户无限互联网动力之源
标题:
Discuz! x3.2 担保交易添加管理员发货流程
[打印本页]
作者:
crx349
时间:
2015-10-31 21:58
标题:
Discuz! x3.2 担保交易添加管理员发货流程
故障描述:支付宝取消个人即时到账功能(支付宝无法使用请用这个修复
http://www.xmspace.net/thread-312-1-1.html
),导致个人用户必须用担保交易方式,但是Discuz在发起交易提交订单后会直接将积分充值给交易用户,而支付宝还在担保流程,这个导致用户取消交易也可以获得积分,人工刷分漏洞...
适用版本:Discuz!x3.1 X3.2
解决步骤:
1、打开/api/trade/notify_credit.php文件
搜索:
C::t('forum_order')->update($orderid, array('status' => '2', 'buyer' => "$notifydata[trade_no]\t$apitype", 'confirmdate' => $_G['timestamp']));
updatemembercount($order['uid'], array($_G['setting']['creditstrans'] => $order['amount']), 1, 'AFD', $order['uid']);
updatecreditbyaction($action, $uid = 0, $extrasql = array(), $needle = '', $coef = 1, $update = 1, $fid = 0);
C::t('forum_order')->delete_by_submitdate($_G['timestamp']-60*86400);
$submitdate = dgmdate($order['submitdate']);
$confirmdate = dgmdate(TIMESTAMP);
notification_add($order['uid'], 'credit', 'addfunds', array(
'orderid' => $order['orderid'],
'price' => $order['price'],
'value' => $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['title'].' '.$order['amount'].' '.$_G['setting']['extcredits'][$_G['setting']['creditstrans']]['unit']
), 1);
复制代码
替换为:
C::t('forum_order')->update($orderid, array('status' => '1', 'buyer' => "$notifydata[trade_no]\t$apitype", 'confirmdate' => 0));//改付款状态为1付款时间为0
//updatemembercount($order['uid'], array($_G['setting']['creditstrans'] => $order['amount']), 1, 'AFD', $order['uid']);//不给会员增加积分
updatecreditbyaction($action, $uid = 0, $extrasql = array(), $needle = '', $coef = 1, $update = 1, $fid = 0);
C::t('forum_order')->delete_by_submitdate($_G['timestamp']-60*86400);
$submitdate = dgmdate($order['submitdate']);
$confirmdate = dgmdate(TIMESTAMP);
notification_add($order['uid'], 'credit', 'addorder', array( //给会员的提醒语句调整一下
'orderid' => $order['orderid'],
'price' => $order['price'],
'value' => $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['title'].' '.$order['amount'].' '.$_G['setting']['extcredits'][$_G['setting']['creditstrans']]['unit']
), 1);
manage_addnotify('verifyorder');//修改4:给管理员发送提
复制代码
2.打开\source\language\lang_notification.php文件,在118行之下增加一条:
'addorder' => '您已提交积分充值请求,等待管理员发货 <p class="summary">订单号:<span>{orderid}</span></p><p class="summary">支出:<span>人民币 {price} 元</span></p><p class="summary">预计收入:<span>{value}</span></p>',
复制代码
然后在204行之下再增加一条:
'manage_verifyorder' => '有新的充值等待发货。<a href="admin.php?action=ec&operation=orders">现在查看</a>',
复制代码
\template\default\home\spacecp_credit_base.htm文件,在
<form id="addfundsform" name="addfundsform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=buy" onsubmit="ajaxpost(this.id, 'return_addfundsform');">
复制代码
之上,添加一行中文:
<p class="mtm">本论坛只能用支付宝帐号担保交易充值。</p><p>交易流程:会员提交充值单--会员付款--等待管理员“发货”--会员在支付宝网站“确认付款”--管理员给会员加金币。提交充值单和添加金币后,都会收到提醒。</p>
复制代码
会员提交订单并付款后,从支付宝公司返回的信息经过\api\trade\notify_credit.php的处理,只把交易号、订单时间、会员名写入数据表,不写付款时间,也不增加会员的积分。然后给会员和管理员各发一条提醒,管理员登陆支付宝网站发货,会员登陆支付宝网站确认付款。管理员看到钱到账后,再登陆论坛后台,人工补单,会员的积分增加,且收到充值积分已到账的提醒,整个充值过程完成。
欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://xmspace.net/)
Powered by Discuz! X3.4