器 | 微信支付V2.0验收测试


主题列表:juejin, github, smartblue, cyanosis, channing-cyan, fancy, hydrogen, condensed-night-purple, greenwillow, v-green, vue-pro, healer-readable, mk-cute, jzman, geek-black, awesome-green

贡献主题:https://github.com/xitu/juejin-markdown-themes

theme: juejin

highlight:

微信支付验收测试

微信支付V2.0验收过程,已验收7个必选用例。


一、【公众-正常】订单金额1.01元,用户支付成功

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>F074FC1B43C81CA81838D573385D31C1</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258653</out_trade_no> <fee_type>CNY</fee_type> <total_fee>101</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225134101656816]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[974D6B8316FD16922296E14759E3D263]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

```

```

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>191D00042208BD3822E088765D77C867</sign> <out_trade_no>2402258653</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[101]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229141411]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <sign><![CDATA[C0932E1CC446C57C7834111D66C416F3]]></sign> <cash_fee><![CDATA[101]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258653]]></out_trade_no> <transaction_id><![CDATA[4148188980920201229141411374662]]></transaction_id> <total_fee><![CDATA[101]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

二、【公众-正常】订单金额1.02元(含0.01元充值代金券,0.02元免充值代金券),用户支付成功

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>B491BD10D5B3F5C48AC6EF39CBB20149</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258657</out_trade_no> <fee_type>CNY</fee_type> <total_fee>102</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225143004273275]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[2698A6ED617894EF02E9C924F7B24312]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

``` M9pxb1Q1zNjWeS1o]]> CASH]]>

```

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>2DAD43386662B7B335231DD584E305F9</sign> <out_trade_no>2402258657</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <coupon_fee><![CDATA[3]]></coupon_fee> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[100]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229143558]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <coupon_batch_id_1><![CDATA[6789]]></coupon_batch_id_1> <coupon_batch_id_0><![CDATA[12345]]></coupon_batch_id_0> <sign><![CDATA[6EC7C8A2862E7D59F145AE5E4F7BB7C0]]></sign> <cash_fee><![CDATA[99]]></cash_fee> <coupon_id_1><![CDATA[10001]]></coupon_id_1> <coupon_type_0><![CDATA[CASH]]></coupon_type_0> <coupon_id_0><![CDATA[10000]]></coupon_id_0> <coupon_fee_0><![CDATA[1]]></coupon_fee_0> <coupon_fee_1><![CDATA[2]]></coupon_fee_1> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258657]]></out_trade_no> <coupon_type_1><![CDATA[NO_CASH]]></coupon_type_1> <transaction_id><![CDATA[4311435797120201229143558249559]]></transaction_id> <total_fee><![CDATA[102]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <coupon_count><![CDATA[2]]></coupon_count> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

三、【公众-异常】订单金额1.3元,用户支付成功,商户未收到微信支付结果通知

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>9A1AD0DE67F7690A7EABCA5F40A47F78</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258610</out_trade_no> <fee_type>CNY</fee_type> <total_fee>130</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225143805139695]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[9E3678A17CC2400D0022CFB315B33D8D]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

无返回数据

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>0195ADBBD59F106D2BDFAAF8D2078C98</sign> <out_trade_no>2402258610</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[130]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229143934]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <sign><![CDATA[FEA2152663006CFC453C6886B16A9B78]]></sign> <cash_fee><![CDATA[130]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258610]]></out_trade_no> <transaction_id><![CDATA[4186526241620201229143934601125]]></transaction_id> <total_fee><![CDATA[130]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

经检查用户支付成功

四、【公众-异常】订单金额1.31元,用户支付失败,商户未收到微信支付结果通知

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>9F9A232268E2021FC9A54B4B026A9E5C</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258611</out_trade_no> <fee_type>CNY</fee_type> <total_fee>131</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225144101355161]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[B8E8D72A22FD9B8985F5C0E2714E9257]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

无响应数据

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>884BCFA4CBF7DE2FFFDDD96C6F3B4CAB</sign> <out_trade_no>2402258611</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[131]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229144253]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[PAYERROR]]></trade_state> <sign><![CDATA[A82B2F1CBB4690453F5FDC60FBE57029]]></sign> <cash_fee><![CDATA[131]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258611]]></out_trade_no> <transaction_id><![CDATA[4200158254020201229144253859595]]></transaction_id> <total_fee><![CDATA[131]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

trade_state该值显示用户支付失败

五、【公众-异常】订单金额1.32元,用户支付成功,微信支付重复通知商户

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>63A204E14C1555E713925980E57A7D24</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258612</out_trade_no> <fee_type>CNY</fee_type> <total_fee>132</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225144438154186]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[B5DE5AD14144755C4C3E8AE78C6B63AA]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

账单支付重复异步通知两次

```

```

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>FAE6BF83BCBD9CBC7D05DEA3FB7E1E39</sign> <out_trade_no>2402258612</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[132]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229144721]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <sign><![CDATA[28FD578AC73098FCDAD891A835359258]]></sign> <cash_fee><![CDATA[132]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258612]]></out_trade_no> <transaction_id><![CDATA[4833022047320201229144721838544]]></transaction_id> <total_fee><![CDATA[132]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

经检查用户支付成功

六、【公众-异常】订单金额1.33元,用户支付成功,微信支付通知签名非法

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>18DB115EFC67924638128179E679B48E</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258613</out_trade_no> <fee_type>CNY</fee_type> <total_fee>133</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

```

```

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

```

```

校验结果签名失败,内容与签名信息不一致

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>6536E2A2C3058C43B15E1C3FC0135CBA</sign> <out_trade_no>2402258613</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[133]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229145321]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <sign><![CDATA[5CA743930E57D6074D23358F17C0DD6A]]></sign> <cash_fee><![CDATA[133]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258613]]></out_trade_no> <transaction_id><![CDATA[4532377153720201229145321230946]]></transaction_id> <total_fee><![CDATA[133]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

经检查用户支付成功

七、【公众-异常】订单金额1.34元,用户支付成功,微信支付通知关键信息不一致

1.统一下单请求参数

【请求地址】POST https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e531c</nonce_str> <sign>7327552ACB5545D81DFA48488A3E094D</sign> <body>string</body> <attach><![CDATA[attach infos]]></attach> <out_trade_no>2402258614</out_trade_no> <fee_type>CNY</fee_type> <total_fee>134</total_fee> <spbill_create_ip>127.0.0.1</spbill_create_ip> <time_start>20201225095511</time_start> <notify_url>https://payment.mestone.com/pay/notify/order</notify_url> <trade_type>JSAPI</trade_type> <openid>oUpF8uMuAJO_M9pxb1Q1zNjWeS1o</openid> </xml>

2.统一下单响应数据

响应数据正常返回prepay_id

<xml> <trade_type><![CDATA[JSAPI]]></trade_type> <prepay_id><![CDATA[wx20201225145547873374]]></prepay_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ok]]></err_code_des> <sign><![CDATA[4802B82601213DF22F5F38715EA8E244]]></sign> <mch_id><![CDATA[2585787312]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

3.微信支付异步通知消息

微信服务调用接口:POST https://payment.mestone.com/pay/notify/order

```

```

total_fee 关键信息与请求参数不一致,异常通知

4.查询账单详情请求参数

【请求地址】https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

<xml> <appid>abc2aa474ff76b6171</appid> <mch_id>2585787312</mch_id> <nonce_str>5d2b6c2a8db53831f7eda20af46e5319</nonce_str> <sign>79ED63162E19C909487C7D77B539766F</sign> <out_trade_no>2402258614</out_trade_no> </xml>

5.查询账单详情响应数据

<xml> <openid><![CDATA[wxd930ea5d5a258f4f]]></openid> <sub_mch_id><![CDATA[]]></sub_mch_id> <cash_fee_type><![CDATA[CNY]]></cash_fee_type> <settlement_total_fee><![CDATA[134]]></settlement_total_fee> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e5319]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[SUCCESS]]></err_code_des> <time_end><![CDATA[20201229145932]]></time_end> <mch_id><![CDATA[2585787312]]></mch_id> <trade_type><![CDATA[JSAPI]]></trade_type> <trade_state_desc><![CDATA[ok]]></trade_state_desc> <trade_state><![CDATA[SUCCESS]]></trade_state> <sign><![CDATA[0389C307C23EA197E265E33799520AD4]]></sign> <cash_fee><![CDATA[134]]></cash_fee> <is_subscribe><![CDATA[Y]]></is_subscribe> <return_msg><![CDATA[OK]]></return_msg> <fee_type><![CDATA[CNY]]></fee_type> <bank_type><![CDATA[CMC]]></bank_type> <attach><![CDATA[sandbox_attach]]></attach> <device_info><![CDATA[sandbox]]></device_info> <out_trade_no><![CDATA[2402258614]]></out_trade_no> <transaction_id><![CDATA[4170079188420201229145932806718]]></transaction_id> <total_fee><![CDATA[134]]></total_fee> <appid><![CDATA[abc2aa474ff76b6171]]></appid> <result_code><![CDATA[SUCCESS]]></result_code> <err_code><![CDATA[SUCCESS]]></err_code> </xml>

查询账单后,检查用户支付成功,且关键信息一致

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值