|
|
@ -152,6 +152,13 @@ class AlipayTradeService extends CI_Controller
|
|
|
|
,$buyer
|
|
|
|
,$buyer
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if ($notify_type == "refund") {
|
|
|
|
} else if ($notify_type == "refund") {
|
|
|
|
|
|
|
|
// 查询已退金额总计
|
|
|
|
|
|
|
|
$query_all_refunds = $this->Alipay_note_model->search_deal_refund_from_memo(
|
|
|
|
|
|
|
|
strval($asyns_resp->data->trade_no),
|
|
|
|
|
|
|
|
strval($asyns_resp->data->gmt_refund)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
$asyns_resp->data->total_refund_fee = strval($asyns_resp->data->refund_fee);
|
|
|
|
|
|
|
|
$asyns_resp->data->refund_fee = ($asyns_resp->data->refund_fee)+($query_all_refunds->refunded_fee);
|
|
|
|
$this->Alipay_note_model->save_alipay(
|
|
|
|
$this->Alipay_note_model->save_alipay(
|
|
|
|
strval($asyns_resp->data->out_biz_no)
|
|
|
|
strval($asyns_resp->data->out_biz_no)
|
|
|
|
,strval($asyns_resp->data->out_trade_no)
|
|
|
|
,strval($asyns_resp->data->out_trade_no)
|
|
|
@ -800,6 +807,8 @@ class AlipayTradeService extends CI_Controller
|
|
|
|
* @param [type] $dealId 必须, 退款请求号.out_biz_no, 或原始交易订单号
|
|
|
|
* @param [type] $dealId 必须, 退款请求号.out_biz_no, 或原始交易订单号
|
|
|
|
* @param [type] $trade_no 必须, 原收款交易号, 和order_id不能同时为空
|
|
|
|
* @param [type] $trade_no 必须, 原收款交易号, 和order_id不能同时为空
|
|
|
|
* @param [type] $order_id 必须, 原收款订单号, 和trade_no不能同时为空
|
|
|
|
* @param [type] $order_id 必须, 原收款订单号, 和trade_no不能同时为空
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @ignore 只能查询API发起的退款, 后台的退款查不到
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function query_refund($dealId=NULL,$trade_no=NULL, $order_id=NULL)
|
|
|
|
public function query_refund($dealId=NULL,$trade_no=NULL, $order_id=NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -813,7 +822,8 @@ class AlipayTradeService extends CI_Controller
|
|
|
|
|
|
|
|
|
|
|
|
$response = $this->aopclientRequestExecute ($request);
|
|
|
|
$response = $this->aopclientRequestExecute ($request);
|
|
|
|
// $response = $response->alipay_trade_fastpay_refund_query_response;
|
|
|
|
// $response = $response->alipay_trade_fastpay_refund_query_response;
|
|
|
|
return $this->output->set_content_type('application/json')->set_output(json_encode($response));
|
|
|
|
return $response;
|
|
|
|
|
|
|
|
// return $this->output->set_content_type('application/json')->set_output(json_encode($response));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function get_billfile($date=NULL)
|
|
|
|
public function get_billfile($date=NULL)
|
|
|
@ -995,7 +1005,7 @@ class AlipayTradeService extends CI_Controller
|
|
|
|
* @return obj
|
|
|
|
* @return obj
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function check($arr){
|
|
|
|
function check($arr){
|
|
|
|
$ret = new ArrayObject();
|
|
|
|
$ret = new stdClass();
|
|
|
|
$ret->check = false;
|
|
|
|
$ret->check = false;
|
|
|
|
$ret->data = NULL;
|
|
|
|
$ret->data = NULL;
|
|
|
|
|
|
|
|
|
|
|
|