Testing Alipay Services : Simulating Response Messages

Simulating Response Messages
Check Status Response
By including a predetermined value in the ap_initiate_trans_ref_no request field, you can generate specific responses in the check status transaction reply message.
To simulate a payment check status response:
Step 1
Request the initiate payment service. Include one of the following transaction reference numbers in the request for the appropriate response. See Table 1.
Step 2
 
Table 1
Refund Response
By including a predetermined value in the grand_total_amount request field, you can generate specific responses in the refund transaction reply message.
To simulate a refund payment response:
 
Any refund amount between 10 and 27 triggers a specific error response.
Step 1
Request the initiate payment service (see Initiating a Payment) and include the ap_initiate_trans_ref_no field in the request. Set the ap_initiate_trans_ref_no field to 666666666702 (see Table 1).
Step 2
Step 3
Request the refund service for the same value (or less) that was included in the initiate payment request (Step 1) and include the request ID returned from the initiate payment request. See Refunding a Payment. Include one of the following amounts in the refund request to receive the specific response.