bugfix
This commit is contained in:
parent
ccc6264a7f
commit
027693094b
@ -23,8 +23,8 @@ class PaymentLog:
|
||||
dbname = self.env.get_module_dbname('unipay')
|
||||
async with self.db.sqlorContext(dbname) as sor:
|
||||
return await self.sor_new_log(sor, userid, customerid, channel,
|
||||
amount, feerate,
|
||||
client_ip, currency=currency)
|
||||
amount, feerate,
|
||||
client_ip, currency=currency)
|
||||
return None
|
||||
|
||||
async def sor_new_log(self, sor,
|
||||
@ -117,25 +117,25 @@ async def new_refund_log(request, amount, origin_id):
|
||||
if len(recs) < 1:
|
||||
raise Exception(f'{origin_id} not a payment_log')
|
||||
ol = recs[0]
|
||||
ns = {
|
||||
"id": env.uuid(),
|
||||
"customerid": ol.customerid,
|
||||
"channelid": ol.channel,
|
||||
"payment_name": REFUND,
|
||||
"payer_client_ip": ol.client_ip,
|
||||
"amount_total": amount,
|
||||
"pay_feerate": 0.0,
|
||||
"pay_fee": 0.0,
|
||||
"currency": ol.currency,
|
||||
"payment_status": '0',
|
||||
"init_timestamp": timestampstr(),
|
||||
"payed_timestamp": "2000-01-01 00:00:00.001",
|
||||
"cancel_timestamp": "2000-01-01 00:00:00.001",
|
||||
"userid": userid,
|
||||
ns = {
|
||||
"id": env.uuid(),
|
||||
"customerid": ol.customerid,
|
||||
"channelid": ol.channel,
|
||||
"payment_name": REFUND,
|
||||
"payer_client_ip": ol.client_ip,
|
||||
"amount_total": amount,
|
||||
"pay_feerate": 0.0,
|
||||
"pay_fee": 0.0,
|
||||
"currency": ol.currency,
|
||||
"payment_status": '0',
|
||||
"init_timestamp": timestampstr(),
|
||||
"payed_timestamp": "2000-01-01 00:00:00.001",
|
||||
"cancel_timestamp": "2000-01-01 00:00:00.001",
|
||||
"userid": userid,
|
||||
"origin_id": origin_id
|
||||
}
|
||||
await sor.C('payment_log', ns.copy())
|
||||
return DictObject(**ns)
|
||||
}
|
||||
await sor.C('payment_log', ns.copy())
|
||||
return DictObject(**ns)
|
||||
|
||||
async def unipay_accounting(request, data):
|
||||
logid = data.out_trade_no
|
||||
@ -154,7 +154,7 @@ async def unipay_accounting(request, data):
|
||||
r.customerid,
|
||||
'RECHARGE',
|
||||
r.id,
|
||||
await env.get_business_date(sor),
|
||||
await env.get_business_date(sor),
|
||||
r.amount_total,
|
||||
r.pay_feerate
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user