feat(M08-B): 补保洁微信转账回调与轮询
This commit is contained in:
@@ -35,6 +35,13 @@ const responses = [
|
||||
transfer_bill_no: 'wx-transfer-501',
|
||||
state: 'WAIT_USER_CONFIRM',
|
||||
package_info: 'package-info'
|
||||
},
|
||||
{
|
||||
mch_id: '1900000109',
|
||||
out_bill_no: 'CLP501',
|
||||
transfer_bill_no: 'wx-transfer-501',
|
||||
state: 'SUCCESS',
|
||||
transfer_amount: 800
|
||||
}
|
||||
];
|
||||
const transport = {
|
||||
@@ -94,6 +101,12 @@ assert.match(requests[4].body, /"out_bill_no":"CLP501"/);
|
||||
assert.match(requests[4].body, /"transfer_amount":800/);
|
||||
assert.equal(requests[4].headers.Authorization.includes(merchantKeys.privateKey), false);
|
||||
|
||||
const queriedTransfer = await client.queryMerchantTransferByOutBillNo(credential, 'CLP501');
|
||||
assert.equal(queriedTransfer.state, 'SUCCESS');
|
||||
assert.equal(queriedTransfer.amountCents, 800);
|
||||
assert.match(requests[5].url, /\/v3\/fund-app\/mch-transfer\/transfer-bills\/out-bill-no\/CLP501$/);
|
||||
assert.equal(requests[5].headers.Authorization.includes(merchantKeys.privateKey), false);
|
||||
|
||||
const notification = encryptedNotification({
|
||||
out_trade_no: 'PAY-M05B-001',
|
||||
transaction_id: 'wx-transaction-test',
|
||||
|
||||
Reference in New Issue
Block a user