Skip to content

Commit

Permalink
✨ (api): 添加微信支付在线支付测试数据 #370
Browse files Browse the repository at this point in the history
- 添加了测试数据,以验证微信支付在线支付规则的正确性。
- 这些测试数据涵盖了多种场景,例如使用零钱支付、使用银行卡支付等。
- 这些测试数据将有助于提高规则的准确性和完整性。
  • Loading branch information
AnkioTomas committed Sep 30, 2024
1 parent 3e78d78 commit 73a1a64
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/rule/com.tencent.mm/app/微信支付在线支付/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ const rules =[
);
},
],
[
//
/使用(.*?)支付¥(\d+\.\d{2})\n收单机构.*/,
(match,t,item) => {
let [, accountNameFrom,money] = match;
return new RuleObject(
BillType.Expend,
toFloat(money),
item.display_name,
'',
accountNameFrom,
'',
0.0,
Currency['人民币'],
t,
'微信[微信支付-在线支付]'
);
},
],
//
];


Expand Down
12 changes: 12 additions & 0 deletions src/rule/com.tencent.mm/app/微信支付在线支付/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@ test('微信支付在线支付', () =>
"time": 0,
"channel": '微信[微信支付-在线支付]',
},
{
"type": "Expend",
"money": 69,
"fee": 0,
"shopName": '淘宝平台商户',
"shopItem": '',
"accountNameFrom": '零钱',
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-在线支付]',
},
]));
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mMap":{"description":"使用零钱支付¥69.00\n收单机构财付通支付科技有限公司","source":"微信支付","type":5,"appId":"","msgId":99064,"title":"已支付¥69.00","display_name":"淘宝平台商户","cachedPayTools":"零钱","cachedPayMoney":"¥69.00","cachedPayShop":""}}

0 comments on commit 73a1a64

Please sign in to comment.