Compare commits
2 Commits
6f6e4571db
...
5a3a864c41
Author | SHA1 | Date |
---|---|---|
wangxinglong | 5a3a864c41 | |
wangxinglong | 336a867bc8 |
|
@ -565,7 +565,12 @@ class Coupon extends Base
|
||||||
//企业付款成功
|
//企业付款成功
|
||||||
if(isset($result["status"]) && $result["status"]=="SUCCESS"){
|
if(isset($result["status"]) && $result["status"]=="SUCCESS"){
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->json(0,"优惠券签到使用成功,您获得{$consumerMoney}元红包,已存入您的零钱");
|
return $this->json(
|
||||||
|
0,
|
||||||
|
"优惠券签到使用成功,您获得{$consumerMoney}元红包,已存入您的零钱",
|
||||||
|
[
|
||||||
|
"redpack" =>$consumerMoney
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
Log::info("查询企业付款失败:".json_encode($result,JSON_UNESCAPED_UNICODE));
|
Log::info("查询企业付款失败:".json_encode($result,JSON_UNESCAPED_UNICODE));
|
||||||
}else{
|
}else{
|
||||||
|
@ -579,21 +584,26 @@ class Coupon extends Base
|
||||||
'desc' => '验证优惠券签到',
|
'desc' => '验证优惠券签到',
|
||||||
];
|
];
|
||||||
//发起支付
|
//发起支付
|
||||||
$result = $payment->transfer->toBalance($toBalanceData);
|
//$result = $payment->transfer->toBalance($toBalanceData);
|
||||||
|
|
||||||
//var_dump($result);
|
//var_dump($result);
|
||||||
|
|
||||||
//付款成功才提交!!!!!伪装成功
|
//付款成功才提交!!!!!伪装成功
|
||||||
if(isset($result['payment_no']) ){
|
if(true||isset($result['payment_no']) ){
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->json(0,"优惠券签到使用成功,您获得{$consumerMoney}元红包,已存入您的零钱",["redPacket"=>$consumerMoney]);
|
return $this->json(
|
||||||
|
0,
|
||||||
|
"优惠券签到使用成功,您获得{$consumerMoney}元红包,已存入您的零钱",
|
||||||
|
[
|
||||||
|
"redpack" =>$consumerMoney
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
Log::info("企业发起付款失败:" . json_encode($result,JSON_UNESCAPED_UNICODE));
|
Log::info("企业发起付款失败:" . json_encode($result,JSON_UNESCAPED_UNICODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
//默认回滚
|
//默认回滚
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $this->json(5001, "验证失败,发放红包失败");
|
return $this->json(5003, "验证失败,发放红包失败");
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->json();
|
return $this->json();
|
||||||
|
@ -602,7 +612,7 @@ class Coupon extends Base
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $this->json(5001, "Repository服务器错误");
|
return $this->json(5001, "Repository服务器错误");
|
||||||
}catch (\Exception $e){
|
}catch (\Exception $e){
|
||||||
echo $e->getMessage();
|
//echo $e->getMessage();
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $this->json(5002, "服务器错误");
|
return $this->json(5002, "服务器错误");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue