fix: 微信支付元转分改用 Decimal,修复 2.01 元被收 2 元
This commit is contained in:
@@ -42,6 +42,7 @@ from rest_framework_simplejwt.authentication import JWTAuthentication
|
||||
from gvsdsdk.fluent import db, func, FQ
|
||||
|
||||
from utils.oss_utils import validate_image, upload_to_oss, delete_from_oss
|
||||
from utils.money import yuan_to_fen
|
||||
from utils.fadan_utils import check_fadan_qiangdan_eligible
|
||||
from utils.invitationcode_utils import CreateInvitationCode, VerifyInvitationCode
|
||||
from users.fadan_fenhong_utils import process_fadan_fenhong
|
||||
@@ -7774,7 +7775,7 @@ class KefuPlatformRefundView(APIView):
|
||||
|
||||
# 生成退款单号
|
||||
out_refund_no = self.generate_refund_no(dingdan_id)
|
||||
total_fee = int(float(jine) * 100)
|
||||
total_fee = yuan_to_fen(jine)
|
||||
refund_fee = total_fee
|
||||
refund_desc = '客服退款'
|
||||
|
||||
@@ -11820,7 +11821,7 @@ class FaKuanPayView(APIView):
|
||||
raise Exception('未知的支付类型')
|
||||
|
||||
nonce_str = ''.join(random.choices(string.ascii_letters + string.digits, k=32))
|
||||
total_fee = int(jine * 100)
|
||||
total_fee = yuan_to_fen(jine)
|
||||
trade_type = 'JSAPI'
|
||||
user_ip = self.get_client_ip()
|
||||
|
||||
@@ -12321,7 +12322,7 @@ class KaohePayView(APIView):
|
||||
raise Exception('未知支付类型')
|
||||
|
||||
nonce_str = ''.join(random.choices(string.ascii_letters + string.digits, k=32))
|
||||
total_fee = int(jine * 100)
|
||||
total_fee = yuan_to_fen(jine)
|
||||
trade_type = 'JSAPI'
|
||||
user_ip = self.get_client_ip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user