verifiers

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 43

Documentation

Overview

Package verifiers 微信支付api v3 go http-client 验证器

Package verifiers 微信支付api v3 go http-client 验证器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WechatPayDefaultVerifier

type WechatPayDefaultVerifier struct {
}

WechatPayDefaultVerifier 默认验证器

func (*WechatPayDefaultVerifier) Verify

func (verifier *WechatPayDefaultVerifier) Verify(ctx context.Context, serialNumber, message, signature string) error

Verify 不对信息进行验证,仅下载证书的时候使用

type WechatPayVerifier

type WechatPayVerifier struct {
	Certificates map[string]*x509.Certificate // key 微信支付平台证书序列号 value 微信支付平台证书 (需要通过下载证书接口获得)
}

WechatPayVerifier 微信支付验证器

func (*WechatPayVerifier) Verify

func (verifier *WechatPayVerifier) Verify(ctx context.Context, serialNumber, message, signature string) error

Verify 对回包中的签名信息进行验证,验证信息是否被篡改、劫持等

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL