平台币优先抵扣

master
tpingzhang 5 years ago
parent 6c27cb7d7d
commit fb570e5635

@ -11,15 +11,16 @@ class BaseController extends RestController{
'Apple.apple_platform_pay','Spend.notice','Apple.apple_union_pay','WapPay.wap_shortcut_pay',
'WapPay.shortcut_pay','WapPay.android_shortcut_pay','WapPay.wap_shortcut_pay','WapPay.wap_shortcut_pay',
'Apple.apple_weixin_pay','Ipa365','User.user_login','platform_coin_deduction','get_user_money',
'file_pay','pay','GameGiftPage','UserH', 'PayH5',
// 'test','Game.get_suspend'
'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk',
// 'test','Game.get_suspend',
];
// 不需要验证TOKEN的接口
protected $noNeedToken = [
'Changyan', 'Exchange', 'FengHuoApi', 'File', 'Game', 'GameGift', 'GameNotify', 'Info', 'ios-wap-Pay',
'Jpush', 'LoginNotify', 'Notice', 'OA', 'OTP', 'OTPServer', 'Pay', 'Payios', 'PointShop', 'Spend',
'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'test'
'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'init_sdk',
// 'test',
];
protected $userId;
protected $userToken;
@ -762,7 +763,6 @@ class BaseController extends RestController{
* $request $discountAmount 折扣价格
*/
public function other_price(&$request, $discountAmount=0) {
return $request;
// 优先扣除绑定币平台币
if ($request['code'] == '0') return $request; // 平台币充值 不做判断
$deductionAmount = 0;

@ -81,12 +81,11 @@ class SpendController extends Controller {
$this->assign ( 'data', $data );
$this->assign ( 'btncolor', $request ['btncolor'] );
if ($balance + $bind_balance > $data['price']) {
$this->assign ('pay_price', $data['price']); // 是否第三方支付
$this->assign ('pay_price', 0); // 是否第三方支付
} else {
$payPrice = $data['price'] - $balance - $bind_balance;
$this->assign ('pay_price', $payPrice ? $payPrice : 0);
}
$this->assign ('pay_price', $data['price']);
/* $this->assign ( 'alipayurl', $ret[0]['payURL']);
header("Access-Control-Allow-Origin: *"); */

@ -241,7 +241,7 @@ $(function() {
$(".paylist").show();
}
$("#platform_pay").click(function() {
var url = "{:U('Apple/platform_coin_deduction',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}";
var url = "{:U('Apple/platform_coin_deduction',array('user_id'=>I('user_id'),'game_id'=>I('game_id'),'user_token'=>I('user_token')))}";
window.location.href = url;
});

@ -15,11 +15,11 @@
<input type="hidden" name="device" class="device" value="{$device}">
<input type="hidden" name="at_once" class="at_once" value="{$at_once}">
<div class="close" onclick="javascript:history.go(-1);">
<!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:">
<img src="__IMG__/callback/close.png">
</a>
</div>
</div> -->
<div class="wxicon">
<img src="__IMG__/pay/wxpay.png">
</div>

Loading…
Cancel
Save