Skip to content

Commit

Permalink
✨新增适配支付宝亲情卡支付 AutoAccountingOrg#32
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Jones committed Apr 10, 2024
1 parent 061d9f5 commit c321cba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function handleLink(pl, result) {
case pl.link.includes("bizType=B_TRANSFER"): //支付宝发红包
case pl.link.includes("bizType=TRADE"): //支付宝消费
case pl.link.includes("bizType=PREAUTHPAY"): //支付宝预授权消费
case pl.link.includes("bizType=PPAY"): //支付宝亲情卡消费
result.type = BillType.Expend;
break;
case pl.link.includes("bizType=D_TRANSFER"): //支付宝转账收款
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,22 @@ test("支付宝预授权消费", () => {
});
})

test("支付宝亲情卡消费", () => {
const dataFilePath = path.join(__dirname, 'tests', '支付宝亲情卡支付.txt');
// 使用readFileSync来同步读取文件内容
const data = fs.readFileSync(dataFilePath, 'utf8')
let result = get(data);

expect(result).toEqual({
type: 0,
money: 55,
fee: 0,
shopName: "173******86(未实名)",
shopItem: "",
accountNameFrom: "北京银行信用购(原花呗)",
accountNameTo: "",
currency: "CNY",
time: 1712723745000,
channel: "支付宝付款成功"
});
})

0 comments on commit c321cba

Please sign in to comment.