|
318
|
318
|
withdraw_type = request.POST.get('withdraw_type', 'TRANSFER')
|
|
319
|
319
|
amount = int(request.POST.get('amount', 0))
|
|
320
|
320
|
|
|
321
|
|
- if not user.wx_uid:
|
|
|
321
|
+ if not user.openid:
|
|
322
|
322
|
return response(WithdrawStatusCode.OPENID_NOT_FOUND)
|
|
323
|
323
|
|
|
324
|
324
|
if user.balance < amount:
|
|
|
|
@@ -330,10 +330,10 @@ def wx_balance_withdraw_api(request):
|
|
330
|
330
|
wxpay = WeChatPay(wechat.get('appID'), wechat.get('apiKey'), wechat.get('mchID'), mch_cert=wechat.get('mch_cert'), mch_key=wechat.get('mch_key'))
|
|
331
|
331
|
|
|
332
|
332
|
if withdraw_type == 'TRANSFER':
|
|
333
|
|
- ret_data = wxpay.transfer.transfer(user.wx_uid, amount, u'摄影师余额提现,企业付款', check_name='NO_CHECK')
|
|
|
333
|
+ ret_data = wxpay.transfer.transfer(user.openid, amount, u'摄影师余额提现,企业付款', check_name='NO_CHECK')
|
|
334
|
334
|
elif withdraw_type == 'PACKET':
|
|
335
|
335
|
ret_data = wxpay.redpack.send(
|
|
336
|
|
- user.wx_uid,
|
|
|
336
|
+ user.openid,
|
|
337
|
337
|
amount,
|
|
338
|
338
|
send_name=wechat.get('redpacket', {}).get('SEND_NAME'),
|
|
339
|
339
|
nick_name=wechat.get('redpacket', {}).get('NICK_NAME'),
|