platformbiz/www/recharge.dspy

18 lines
414 B
Plaintext
Raw Normal View History

2025-01-10 18:37:11 +08:00
debug(f'{params_kw=}')
try:
userid = await get_user()
userorgid = await get_userorgid()
r = Recharge(userorgid, userid, float(params_kw.recharge_amt), params_kw.channel)
url = await r.start_recharge()
return {
"widgettype":"NewWindow",
"options":{
"url":url
}
}
except Exception as e:
es = format_exc()
exception(f'{e=}, {es}')
return UiError(title='Error', message=f'Error:{e},trackback={es}')