提现回调修改
This commit is contained in:
@@ -219,13 +219,13 @@ class Payment extends Controller
|
|||||||
$yun_pay = new YunPay();
|
$yun_pay = new YunPay();
|
||||||
$result = $yun_pay->yun_callback($data,$mess,$timestamp,$sign);
|
$result = $yun_pay->yun_callback($data,$mess,$timestamp,$sign);
|
||||||
if($result['code']==1){
|
if($result['code']==1){
|
||||||
$data = $result['data']['data'];
|
$data = $result['data'];
|
||||||
if($data){
|
if($data){
|
||||||
$status = $data['status'];
|
|
||||||
if(!isset($data['status'])){
|
if(!isset($data['status'])){
|
||||||
echo 'fail';
|
echo 'fail';
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
$status = $data['status'];
|
||||||
switch ($status){
|
switch ($status){
|
||||||
case "1":
|
case "1":
|
||||||
// 支付成功(对于支付宝和微信支付是最终状态,对于银行卡大部分情况是终态,小概率会出现"退汇现象",状态由"成功"变为"退汇")
|
// 支付成功(对于支付宝和微信支付是最终状态,对于银行卡大部分情况是终态,小概率会出现"退汇现象",状态由"成功"变为"退汇")
|
||||||
|
|||||||
@@ -230,13 +230,14 @@ class YunPay
|
|||||||
// 异步回调参数
|
// 异步回调参数
|
||||||
$notifyReq = new NotifyRequest ($data, $mess, $timestamp, $sign) ;// 发起验签解密
|
$notifyReq = new NotifyRequest ($data, $mess, $timestamp, $sign) ;// 发起验签解密
|
||||||
try {
|
try {
|
||||||
$result = $notifyClient->verifyAndDecrypt($notifyReq) ;
|
$result = $notifyClient->verifyAndDescrype($notifyReq) ;
|
||||||
Log::record("云账户回调信息".json_encode($result),"info");
|
Log::record("云账户回调信息-返回:".json_encode($result),"info");
|
||||||
if ($result) {
|
$result = json_decode($result,true);
|
||||||
|
if ($result['signRes']) {
|
||||||
// 验签通过、解密成功
|
// 验签通过、解密成功
|
||||||
return ['code' => 1, 'msg' => "验签通过、解密成功:", 'data' => $result];
|
return ['code' => 1, 'msg' => "验签通过、解密成功:", 'data' => $result['data']];
|
||||||
}else{
|
}else{
|
||||||
return ['code' => 0, 'msg' => "验签失败", 'data' => null];
|
return ['code' => 0, 'msg' => "验签失败", 'data' => $result['data']];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception $e){
|
catch(Exception $e){
|
||||||
|
|||||||
Reference in New Issue
Block a user