smartwalle/alipay

加载证书报错

yi121320125 opened this issue · 0 comments

版本

go 1.17.1
github.com/smartwalle/alipay/v3 v3.1.6

代码

package main

import (
	"fmt"
	"github.com/smartwalle/alipay/v3"
)

var (
	appId      = "2021002117616048"
	privateKey = "xxxxx"
	client, _  = alipay.New(appId, privateKey, false)
)

func init() {
	fmt.Println("appId", appId)

	client.LoadAppPublicCertFromFile("crt/appCertPublicKey_2021002117616048.cer") // 加载应用公钥证书
	client.LoadAliPayRootCertFromFile("crt/alipayRootCert.cer")                   // 加载支付宝根证书
	client.LoadAliPayPublicCertFromFile("crt/alipayCertPublicKey_RSA2.cer")       // 加载支付宝公钥证书
}

func main() {
	fmt.Print("hhh")
}

报错信息

image