Skip to content

Commit

Permalink
✨ (微信支付自动扣款): 更新扣费渠道名称并添加新测试用例 #623
Browse files Browse the repository at this point in the history
- 将扣费渠道名称从“微信[微信支付-扣款]”统一更新为“微信[微信支付-自动扣费]”
- 添加新的测试用例“微信支付自动扣费10.txt”,模拟拼多多订单免密支付扣费场景
- 更新正则表达式以支持“扣费方式”字段的匹配
  • Loading branch information
AnkioTomas committed Dec 28, 2024
1 parent 2487bfa commit 60c3eb0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
9 changes: 5 additions & 4 deletions src/rule/com.tencent.mm/app/微信支付自动扣款/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const rules =[
0.0,
Currency['人民币'],
t,
'微信[微信支付-扣款]'
'微信[微信支付-自动扣费]'
);
},
],
Expand All @@ -43,7 +43,7 @@ const rules =[
0.0,
Currency['人民币'],
t,
'微信[微信支付-扣款]'
'微信[微信支付-自动扣费]'
);
},
],
Expand All @@ -55,7 +55,8 @@ const rules =[
//扣费金额¥25.00\n扣费项目迅雷超级会员微信自动续费\n支付方式中国银行储蓄卡(7575)\n收单机构财付通支付科技有限公司\n备注你的深圳市迅雷网络技术有限公司账号(185*****230)扣费成功。如果对扣费有疑问,请联系商户确认
// 扣费金额¥35.82\n扣费项目湖南电信话费自动缴费\n支付方式零钱\n收单机构财付通支付科技有限公司\n备注你的中国电信湖南网厅账号(19314326581)扣费成功。如果对扣费有疑问,请联系商家确认
// 续费金额¥98.50\n续费项目腾讯王卡微信话费代扣\n续费方式零钱\n收单机构财付通支付科技有限公司\n备注你的江苏联通账号(1273747744)续费成功。如果对续费有疑问,请联系商家确认。",
/[扣续]费金额¥(\d+\.\d{2})\n[扣续]费项目(.*?)\n(支付|续费)方式(.*?)\n收单机构(.*?)\n备注(.*?)。如果对[扣续]费有疑问,请联系商[户家]确认/,
// 扣费金额¥26.70\n扣费项目拼多多订单免密支付\n扣费方式零钱通\n收单机构财付通支付科技有限公司\n备注你的拼多多平台商户账号(~水)扣费成功。如果对扣费有疑问,请联系商家确认。
/[扣续]费金额¥(\d+\.\d{2})\n[扣续]费项目(.*?)\n(支付|续费|扣费)方式(.*?)\n收单机构(.*?)\n备注(.*?)。如果对[扣续]费有疑问,请联系商[户家]确认/,
(match,t,item) => {
const [, money, shopName, , accountNameFrom, remark, shopItem] = match;
return new RuleObject(
Expand All @@ -68,7 +69,7 @@ const rules =[
0.0,
Currency['人民币'],
t,
'微信[微信支付-扣款]'
'微信[微信支付-自动扣费]'
);
},
],
Expand Down
30 changes: 21 additions & 9 deletions src/rule/com.tencent.mm/app/微信支付自动扣款/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -28,7 +28,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -41,7 +41,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -53,7 +53,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -65,7 +65,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -77,7 +77,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -89,7 +89,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 0,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
"type": "Expend",
Expand All @@ -101,7 +101,7 @@ test('微信支付自动扣费', () =>
"accountNameTo": '',
"currency": 'CNY',
"time": 1727808197266,
"channel": '微信[微信支付-扣款]',
'channel': '微信[微信支付-自动扣费]'
},
{
'type': 'Expend',
Expand All @@ -113,6 +113,18 @@ test('微信支付自动扣费', () =>
'accountNameTo': '',
'currency': 'CNY',
'time': 1732594766650,
'channel': '微信[微信支付-扣款]'
'channel': '微信[微信支付-自动扣费]'
},
{
'type': 'Expend',
'money': 26.7,
'fee': 0,
'shopName': '拼多多订单免密支付',
'shopItem': '你的拼多多平台商户账号(~水)扣费成功',
'accountNameFrom': '零钱通',
'accountNameTo': '',
'currency': 'CNY',
'time': 1734775611530,
'channel': '微信[微信支付-自动扣费]'
}
]));
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"mMap": {
"description": "扣费金额¥26.70\n扣费项目拼多多订单免密支付\n扣费方式零钱通\n收单机构财付通支付科技有限公司\n备注你的拼多多平台商户账号(~水)扣费成功。如果对扣费有疑问,请联系商家确认。",
"source": "微信支付",
"type": 5,
"appId": "",
"msgId": 99064,
"title": "已扣费¥26.70",
"display_name": "拼多多平台商户",
"hookerUser": "Ten.泰坚,陈主任",
"cachedPayTools": "零钱通",
"cachedPayMoney": "¥5.00",
"cachedPayShop": "付款给17556967187(**美)",
"t": 1734775611530
}
}

0 comments on commit 60c3eb0

Please sign in to comment.