From c308c5e9ef94da0761357da1909f9a6a6ae080d1 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 16 Jul 2026 16:31:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E7=8E=B0=E8=BD=AC=E8=B4=A6?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E8=BD=AE=E8=AF=A2=E5=90=8E=E5=8F=B0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=8C=B9=E9=85=8D=E8=BD=AC?= =?UTF-8?q?=E8=B4=A6=E7=A0=81=E5=B9=B6=E5=AE=8C=E6=88=90=E5=85=A5=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/.transfercode.json.swp | Bin 0 -> 12288 bytes unipay/init.py | 4 ++ unipay/providers/transfer.py | 84 +++++++++++++++++++++++++++++----- 3 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 models/.transfercode.json.swp diff --git a/models/.transfercode.json.swp b/models/.transfercode.json.swp new file mode 100644 index 0000000000000000000000000000000000000000..8e43a4983df2e3cc56a87682b257a24d1a178b1c GIT binary patch literal 12288 zcmeI2Pe>F|9LJy8rA!OWx&&?0DM(jWD2<@55k-gU5>n&tTN{}_+svDE6SE}f&m}zV zB`JkEgam=zbh6w|D4TxMF8%5fDDiUGO!5^s2RqdZ)5EJb`+2Q{|A5n|JljdGWZGJf(dX3Sl|jc366jy z*biF4Y7=8Wz(+6*CP4wX;5_I73D61}z;YvFU%*RH0ApYf7~mXe2Q6TA2V=iL5qttu zU_t@M3$6|#UGgq_%Xwl&>)h-YS8-!! ztde}rE5s3YJipLHsmO%~v&CDtyYs5d@HnRab2L^=H0IfZ6$lxpN+Q}s{c*`>lvjl?oeq`P|J(D+d% ziw{~Tp_cK*H`9wV&la9kl`iDGud9p 0.01: + debug(f'amount mismatch: tc={tc.amount}, mail={data.amount}') + continue + + biz_date = await env.get_business_date(sor) + await sor.U('transfercode', {'id': tc.id, 'status': '1'}) + + recs2 = await sor.R('payment_log', {'id': tc.id, 'payment_status': '0'}) + if len(recs2) > 0: + plog = recs2[0] + await env.recharge_accounting(sor, + plog.customerid, + 'RECHARGE', + plog.id, + biz_date, + plog.amount_total, + plog.pay_feerate) + await sor.U('payment_log', { + 'id': plog.id, + 'payment_status': '1', + 'payed_timestamp': timestampstr() + }) + debug(f'transfer recharge done: {tc.id}, amount={data.amount}') + ec.client.dele(i) + except Exception as e2: + exception(f'transfer mail[{i}] error: {e2}') + ec.client.quit() + except Exception as e: + exception(f'transfer poll error: {e}') + await asyncio.sleep(30) + async def query(self, out_trade_no: str) -> Dict[str, Any]: pass