bugfix
This commit is contained in:
parent
95a95dc548
commit
73c704bb0d
@ -225,7 +225,7 @@ where a.id = ${productid}$
|
||||
'list_price': list_price,
|
||||
'sell_price': sell_price
|
||||
}
|
||||
elif prod.pricing_method == '1':
|
||||
elif prod.pricing_method == '9':
|
||||
# 外部计费
|
||||
f = get_serverenv('pricing_api')
|
||||
list_price = await f(sor, prod.apiid, providerpid, prod_config)
|
||||
|
||||
@ -3,6 +3,7 @@ from appPublic.registerfunction import rfexe
|
||||
from appPublic.log import exception, debug
|
||||
from sqlor.dbpools import DBPools
|
||||
from pf_pay.ali_pay import Zhifubao_Pay
|
||||
from pf_pay.wechat_pay_h5 import WechatPayClient
|
||||
from platformbiz.getdbname import get_dbname
|
||||
from platformbiz.biz_order import add_recharge_log, add_recharge_order
|
||||
|
||||
@ -12,17 +13,11 @@ class Recharge:
|
||||
self.userid = userid
|
||||
self.recharge_amt = recharge_amt
|
||||
self.pc_name = pc_name
|
||||
if pc_name not in ['alipay']:
|
||||
raise Exception(f'{pc_name} pay channel not implemented')
|
||||
|
||||
async def start_recharge(self):
|
||||
return await self.start_recharge_action('RECHARGE')
|
||||
|
||||
|
||||
async def start_recharge_reverse(self):
|
||||
return await self.start_recharge_action('RECHARGE_REVERSE')
|
||||
|
||||
async def start_recharge_action(self, action):
|
||||
async def start_recharge_action(self, request, action):
|
||||
db = DBPools()
|
||||
dbname = get_dbname()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
@ -43,6 +38,10 @@ class Recharge:
|
||||
z = Zhifubao_Pay()
|
||||
url = await z.alipay_payment(rl.id, rl.recharge_amt, action)
|
||||
return url
|
||||
if self.pc_name == 'wxpay':
|
||||
wxp = WechatPayClient()
|
||||
url = await wxp.create_h5_url(request, rl, action)
|
||||
return url
|
||||
|
||||
exception(f'exception ...........{self.pc_name}')
|
||||
raise Exception(f'{self.pc_name} pay channel not implemented')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user