|
|
@@ -198,4 +198,30 @@ class AlipayService extends BaseService |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* alipay.trade.fastpay.refund.query(统一收单交易退款查询) |
|
|
|
* @param $out_trade_no string 商户订单号 |
|
|
|
* @param $out_request_no string 退款请求号。 |
|
|
|
* @param string $app_auth_token 应用授权(详见应用授权概述https://opendocs.alipay.com/isv/10467/xldcyq) |
|
|
|
* @return array |
|
|
|
*/ |
|
|
|
public function alipayTradeFastpayRefundQuery($out_trade_no, $out_request_no, $app_auth_token) |
|
|
|
{ |
|
|
|
$params["out_trade_no"] = $out_trade_no; |
|
|
|
$params["out_request_no"] = $out_request_no; |
|
|
|
|
|
|
|
$request = new \AlipayTradeRefundRequest(); |
|
|
|
$paramsJson = json_encode($params); |
|
|
|
$request->setBizContent($paramsJson); |
|
|
|
$response = self::$aopClient->execute($request, null, $app_auth_token); |
|
|
|
$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response"; |
|
|
|
$responseData = json_decode(json_encode($response->$responseNode), true); |
|
|
|
$this->logger(["params" => $params, "response" => $responseData], 'alipay.trade.fastpay.refund.query', true); |
|
|
|
if ($responseData['code'] == 10000) { |
|
|
|
return $this->returnRes(true, $responseData['msg'], $responseData); |
|
|
|
} else { |
|
|
|
return $this->returnRes(false, ($responseData['sub_msg'] ?? $responseData['msg']), $responseData); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |