Giter Club home page Giter Club logo

Comments (3)

EmmetZC avatar EmmetZC commented on August 11, 2024

直接从下载接口下载到的平台证书是使用 AEAD_AES_256_GCM 算法加密过的,要想获得初始化Client所需要的x509.Certificate实例,需要以下两步:

  1. 使用你的 APIv3密钥 来进行解密,解密所需要的方法在 package utils中,即utils.DecryptAES256GCM,解密后就可以得到证书的明文了。
  2. 使用 utils.LoadCertificate 将解密后的证书加载到内存中,就可以得到 x509.Certificate 实例了。

from wechatpay-go.

EmmetZC avatar EmmetZC commented on August 11, 2024

aeskey 即是你的 APIv3密钥,其他字段都从证书下载接口返回的数据中取。

详见:证书和回调报文解密

from wechatpay-go.

xy-peng avatar xy-peng commented on August 11, 2024

可以参考dev分支,里面自动下载并维护平台证书的manager,还带有命令行工具下载证书到本地目录

from wechatpay-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.