Skip to content

Commit

Permalink
🐛 (微信支付扫码支付): 修复收单机构匹配问题
Browse files Browse the repository at this point in the history
更新正则表达式以正确捕获收单机构名称,并修正测试用例中的商店项目名称。
  • Loading branch information
AnkioTomas committed Dec 18, 2024
1 parent bf59617 commit d4da267
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/rule/com.tencent.mm/app/微信支付扫码支付/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ const TITLE_WECHAT = [
const rules =[
[
//支付金额¥29.00\n支付方式零钱\n收单机构财付通支付科技有限公司
/(付款|支付)金额¥(\d+\.\d{2})\n(付款|支付)方式(.*?)\n收单机构.*/,
/(付款|支付)金额¥(\d+\.\d{2})\n(付款|支付)方式(.*?)\n收单机构(.*?)$/,
(match,t,item) => {
let [,, money, ,accountNameFrom] = match;
let [,, money, ,accountNameFrom,shopItem] = match;
return new RuleObject(
BillType.Expend,
toFloat(money),
item.display_name,
item.cachedPayShop,
shopItem,
accountNameFrom,
'',
0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test('微信支付扫码付款', () =>
"money": 29,
"fee": 0,
"shopName": '十六楼工作室',
"shopItem": '面对面红包',
"shopItem": '财付通支付科技有限公司',
"accountNameFrom": '零钱',
"accountNameTo": '',
"currency": 'CNY',
Expand Down

0 comments on commit d4da267

Please sign in to comment.