fix(transfer): regex add optional ¥ before amount

This commit is contained in:
yumoqing 2026-07-17 14:14:43 +08:00
parent c0c04b2bd0
commit 7247cd518a

View File

@ -130,7 +130,7 @@ class TransferGateway(Gateway):
debug(f'get_transfer_data: body not start with 动账业务通知, head={mail.body[:30]}') debug(f'get_transfer_data: body not start with 动账业务通知, head={mail.body[:30]}')
return None return None
ns = DictObject() ns = DictObject()
match = re.search(r'交易金额\s*[:]?\s*(\d+(?:\.\d+)?)', mail.body) match = re.search(r'交易金额\s*[:]\s*¥?\s*(\d+(?:\.\d+)?)', mail.body)
if match: if match:
ns.amount = float(match.group(1)) ns.amount = float(match.group(1))
debug(f'get_transfer_data: amount={ns.amount}') debug(f'get_transfer_data: amount={ns.amount}')