《统一收单交易退款查询)》https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query/
```
/**
* 退款查询 - 测试
* url: http://tp5_alipay2017/index/alipay/refundQueryTest
*/
public function refundQueryTest()
{
alipayRefundQuery('2017091810199555','2017091821001004920267861832','22384701');
}
```
## 申请退款
![mark](http://qiniu.newthink.cc/blog/20170918-002158372.png)
返回的数据
```
C:\project\tp3_alipay2017\Application\Home\Common\function.php:123:
object(stdClass)[15]
public 'alipay_trade_fastpay_refund_query_response' =>
object(stdClass)[16]
public 'code' => string '10000' (length=5)
public 'msg' => string 'Success' (length=7)
public 'sign' => string 'KEY4rd8CjKH0Lh6bWWkk+mH648B5YYZm81ovbZIDLrXvMhV5qYgz7eveXjUoJb4qgXjxyMJlt+VCdqFjzmOAAcOUQHhPXFHj35mE1f+kIBe+FZAJpLKos+8Qw7rrqGV+OyiapurHajKdLtfzbvuTNb/ATKnBr6Zx10pIm5V6ADSBb9HcctBlxcT+9zTneraKYL/VNkpmUVAWQGyH0mrHQn3yQCKD/MAAMkr/ozq1eVNqZ/JSb60Os82GNU3ZVDV3VLrFTS8u/ZnPJS98ztZfYyRe9HPqoEcxUFihJRhOf0hs/xJgDXiAPGR9ObxjCIPLY1quLX2ZtPRAHQ0pSwT9oA==' (length=344)
```
## 退款处理
![mark](http://qiniu.newthink.cc/blog/20170918-003708925.png)
```
C:\project\tp3_alipay2017\Application\Home\Common\function.php:94:
object(stdClass)[16]
public 'code' => string '40004' (length=5)
public 'msg' => string 'Business Failed' (length=15)
public 'sub_code' => string 'ACQ.REFUND_AMT_NOT_EQUAL_TOTAL' (length=30)
public 'sub_msg' => string '撤销或退款金额与订单金额不一致' (length=45)
public 'out_trade_no' => string '201791713650556' (length=15)
public 'refund_fee' => string '0.00' (length=4)
public 'send_back_fee' => string '0.00' (length=4)
```
列表
![mark](http://qiniu.newthink.cc/blog/20170918-004443545.png)