|
|
@ -347,7 +347,7 @@ class IPayLinksService extends CI_Controller
|
|
|
|
|
|
|
|
|
|
|
|
//退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理
|
|
|
|
//退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理
|
|
|
|
if ($item->IPL_payType == 'refund') {
|
|
|
|
if ($item->IPL_payType == 'refund') {
|
|
|
|
$this->Note_model->update_send($item->IPL_dealId, 'send');
|
|
|
|
// $this->Note_model->update_send($item->IPL_dealId, 'send');
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -611,23 +611,35 @@ class IPayLinksService extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 未得到结果
|
|
|
|
// 未得到结果
|
|
|
|
if (empty($asyns_resp->data->orderId)) {
|
|
|
|
if (empty($asyns_resp->data->orderId)) {
|
|
|
|
echo "200";
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// dealId
|
|
|
|
// dealId
|
|
|
|
$dealId = trim($asyns_resp->data->dealId) ;
|
|
|
|
$dealId = trim($asyns_resp->data->dealId) ;
|
|
|
|
$tmp_deal = $dealId ? $dealId : $this->create_guid();
|
|
|
|
$tmp_deal = $dealId ? $dealId : $this->create_guid();
|
|
|
|
// payer info
|
|
|
|
// payer info
|
|
|
|
$payer_info = json_decode($asyns_resp->data->remark);
|
|
|
|
if (isset($asyns_resp->data->remark)) {
|
|
|
|
$payer_name = $payer_info->n;
|
|
|
|
$payer_info = json_decode($asyns_resp->data->remark);
|
|
|
|
$payer_email = $payer_info->e;
|
|
|
|
$payer_name = $payer_info->n;
|
|
|
|
|
|
|
|
$payer_email = $payer_info->e;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (true === $this->if_note_exists($dealId)) {
|
|
|
|
bcscale(2);
|
|
|
|
echo "200";
|
|
|
|
/** 退款成功 */
|
|
|
|
|
|
|
|
if (isset($asyns_resp->data->refundOrderId) && strcmp($asyns_resp->data->resultCode, '2') == 0) {
|
|
|
|
|
|
|
|
$this->Note_model->save_refund(
|
|
|
|
|
|
|
|
strval($asyns_resp->data->dealId)
|
|
|
|
|
|
|
|
, strval($asyns_resp->data->orderId)
|
|
|
|
|
|
|
|
, strval("-" . bcdiv(floatval($asyns_resp->data->refundAmount), 100))
|
|
|
|
|
|
|
|
, strval(date('Y-m-d H:i:s',strtotime($asyns_resp->data->refundTime)))
|
|
|
|
|
|
|
|
, strval(date('Y-m-d H:i:s',strtotime($asyns_resp->data->completeTime)))
|
|
|
|
|
|
|
|
, $asyns_resp->data->resultCode
|
|
|
|
|
|
|
|
, "0000"
|
|
|
|
|
|
|
|
, json_encode($asyns_resp->data)
|
|
|
|
|
|
|
|
, "refund"
|
|
|
|
|
|
|
|
);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bcscale(2);
|
|
|
|
|
|
|
|
// 支付成功
|
|
|
|
// 支付成功
|
|
|
|
// 查询支付结果;入库处理
|
|
|
|
// 查询支付结果;入库处理
|
|
|
|
if ( ! empty($dealId)) {
|
|
|
|
if ( ! empty($dealId)) {
|
|
|
@ -650,7 +662,6 @@ class IPayLinksService extends CI_Controller
|
|
|
|
$query = $this->query_pay_result($asyns_resp->data);
|
|
|
|
$query = $this->query_pay_result($asyns_resp->data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 返回状态码200
|
|
|
|
// 返回状态码200
|
|
|
|
echo "200";
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|