支付宝线下支付:支付成功后仍可调用取消接口成功
- 只有当面付交易(线下支付),当天可以调用CANCEL接口取消
- 不是当天的交易的话,不能取消,只能退款
- 当天的交易可以取消或者退款
- 只有线下支付是这样的
- 线上支付,是没有取消接口的
关于对账单,支付完成后:
- 1走退款:有P和R记录
- 2走取消:transaction_file只有C记录;settlment_file在交易支付成功的前提下,会是一条正向交易记录,一条退款记录
支付成功:
<alipay>
<is_success>T</is_success>
<request>
<param name="trans_create_time">20201202102128</param>
<param name="biz_product">OVERSEAS_MBARCODE_PAY</param>
<param name="_input_charset">UTF-8</param>
<param name="identity_code_type">barcode</param>
<param name="sign">c1ff3e12d6a83393e2c1518aee98fc85</param>
<param name="alipay_seller_id">2088621953527954</param>
<param name="trans_name">display your order info</param>
<param name="notify_url">https://callback.yezhou.cc/alipay/payment/alipay_offline/barcode</param>
<param name="trans_amount">500.55</param>
<param name="extend_info">{"secondary_merchant_id":"182020110200218018","secondary_merchant_industry":"0780","secondary_merchant_name":"appblog.cn","store_id":"182020110200218028","store_name":"qa_madonald"}</param>
<param name="partner_trans_id">132020120200601008</param>
<param name="partner">2088621953527954</param>
<param name="service">alipay.acquire.overseas.spot.pay</param>
<param name="currency">THB</param>
<param name="buyer_identity_code">286951561588995462</param>
<param name="sign_type">MD5</param>
</request>
<response>
<alipay>
<alipay_buyer_login_id>for*@alitest.*</alipay_buyer_login_id>
<alipay_buyer_user_id>2088622925098759</alipay_buyer_user_id>
<alipay_pay_time>20201202102132</alipay_pay_time>
<alipay_trans_id>2020120222001498750501294092</alipay_trans_id>
<currency>THB</currency>
<exchange_rate>0.20311992</exchange_rate>
<partner_trans_id>132020120200601008</partner_trans_id>
<result_code>SUCCESS</result_code>
<trans_amount>500.55</trans_amount>
<trans_amount_cny>101.67</trans_amount_cny>
</alipay>
</response>
<sign>3a3958c11c42319a8b36d4161db7dcd3</sign>
<sign_type>MD5</sign_type>
</alipay>
退款成功:
<?xml version="1.0" encoding="UTF-8"?>
<alipay>
<is_success>T</is_success>
<request>
<param name="out_trade_no">132020120200601008</param>
<param name="partner">2088621953527954</param>
<param name="_input_charset">UTF-8</param>
<param name="service">alipay.acquire.cancel</param>
<param name="sign">e88b3a7181fc4eb49cbcbd2a4adf809b</param>
<param name="sign_type">MD5</param>
<param name="timestamp">1606875699</param>
</request>
<response>
<alipay>
<action>refund</action>
<out_trade_no>132020120200601008</out_trade_no>
<result_code>SUCCESS</result_code>
<retry_flag>N</retry_flag>
<trade_no>2020120222001498750501294092</trade_no>
</alipay>
</response>
<sign>b285153244938bd790449b418fbd1ec2</sign>
<sign_type>MD5</sign_type>
</alipay>
如果是未支付,取消接口返回:
<?xml version="1.0" encoding="UTF-8"?>
<alipay>
<is_success>T</is_success>
<request>
<param name="out_trade_no">132020120400603015</param>
<param name="partner">2088621953527954</param>
<param name="_input_charset">UTF-8</param>
<param name="service">alipay.acquire.cancel</param>
<param name="sign">4986f4866d564f978fdce6a2cad715ac</param>
<param name="sign_type">MD5</param>
<param name="timestamp">1607056755</param>
</request>
<response>
<alipay>
<action>close</action>
<out_trade_no>132020120400603015</out_trade_no>
<result_code>SUCCESS</result_code>
<retry_flag>N</retry_flag>
<trade_no>2020120422001485280505744443</trade_no>
</alipay>
</response>
<sign>982c981cdceaa43bb85f10c13d80da22</sign>
<sign_type>MD5</sign_type>
</alipay>
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/25/alipay-offline-payment-interface-can-still-be-called-to-cancel-successfully-after-successful-payment/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
支付宝线下支付:支付成功后仍可调用取消接口成功
只有当面付交易(线下支付),当天可以调用CANCEL接口取消
不是当天的交易的话,不能取消,只能退款
当天的交易可以取消或者退款
只有线下支付是这样的
线上……
文章目录
关闭
共有 0 条评论