Improve NewWechatPaymentProvider() arg

This commit is contained in:
Yang Luo
2023-05-27 19:28:24 +08:00
parent 8ede4993af
commit c7cea331e2
4 changed files with 6 additions and 7 deletions

View File

@ -34,8 +34,8 @@ type WechatPaymentProvider struct {
appId string
}
func NewWechatPaymentProvider(appId string, mchId string, cert string, mchCertSerialNumber string, apiV3Key string, privateKey string) (*WechatPaymentProvider, error) {
if appId == "" && mchId == "" && cert == "" && mchCertSerialNumber == "" && apiV3Key == "" && privateKey == "" {
func NewWechatPaymentProvider(mchId string, apiV3Key string, appId string, mchCertSerialNumber string, privateKey string) (*WechatPaymentProvider, error) {
if appId == "" && mchId == "" && mchCertSerialNumber == "" && apiV3Key == "" && privateKey == "" {
return &WechatPaymentProvider{}, nil
}