优化代码

pull/26/merge
isummer 2 years ago
parent d8b124c1a7
commit 2224ce27c7
  1. 8
      fir_client/src/components/FirFooter.vue
  2. 2
      fir_ser/common/libs/pay/wx.py
  3. 6
      fir_ser/common/libs/pay/wxpay/__init__.py
  4. 4
      fir_ser/common/libs/pay/wxpay/core.py

@ -34,14 +34,14 @@ export default {
data() {
return {
footer: {
copyright: 'Copyright © 2020-2022 东城飞阳 版权所有.',
copyright: 'Copyright © 2020-2099 isummer 版权所有.',
ipcBeiAn: {
url: 'https://beian.miit.gov.cn',
text: '粤ICP备2021097895号',
text: '京ICP备681262896号',
},
gongAnBeiAn: {
url: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41142202000062',
text: '豫公网安备41142202000062号',
url: 'https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=681262896',
text: '京公网安备681262896号',
},
}
}

@ -24,7 +24,7 @@ class Weixinpay(object):
def __get_wx_pay(self):
return WeChatPay(wechatpay_type=WeChatPayType.NATIVE,
mchid=self.wx_config.get('MCH_ID'),
parivate_key=self.wx_config.get('APP_PRIVATE_KEY'),
private_key=self.wx_config.get('APP_PRIVATE_KEY'),
cert_serial_no=self.wx_config.get('SERIAL_NO'),
appid=self.wx_config.get('APP_ID'),
notify_url=f"{self.wx_config.get('APP_NOTIFY_URL')}/{self.name}",

@ -8,7 +8,7 @@ class WeChatPay(object):
def __init__(self,
wechatpay_type,
mchid,
parivate_key,
private_key,
cert_serial_no,
appid,
apiv3_key,
@ -16,7 +16,7 @@ class WeChatPay(object):
"""
:param wechatpay_type: 微信支付类型示例值WeChatPayType.MINIPROG
:param mchid: 直连商户号示例值'1230000109'
:param parivate_key: 商户证书私钥示例值'MIIEvwIBADANBgkqhkiG9w0BAQE...'
:param private_key: 商户证书私钥示例值'MIIEvwIBADANBgkqhkiG9w0BAQE...'
:param cert_serial_no: 商户证书序列号示例值'444F4864EA9B34415...'
:param appid: 应用ID示例值'wxd678efh567hg6787'
:param apiv3_key: 商户APIv3密钥示例值'a12d3924fd499edac8a5efc...'
@ -28,7 +28,7 @@ class WeChatPay(object):
self._notify_url = notify_url
self._core = Core(mchid=self._mchid,
cert_serial_no=cert_serial_no,
private_key=parivate_key,
private_key=private_key,
apiv3_key=apiv3_key)
def pay(self,

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# wechatpay v3 python sdk(https://github.com/minibear2021/wechatpayv3)
import json
import time
import uuid
@ -175,8 +176,7 @@ class Core():
headers = {}
headers.update({'Content-Type': 'application/json'})
headers.update({'Accept': 'application/json'})
headers.update(
{'User-Agent': 'wechatpay v3 python sdk(https://github.com/minibear2021/wechatpayv3)'})
headers.update({'User-Agent': 'flyapps python sdk'})
authorization = build_authorization(
path,
'GET' if method == RequestType.GET else 'POST',

Loading…
Cancel
Save