credentials

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package credentials 微信支付 API v3 Go SDK 请求报文头 Authorization 信息生成器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WechatPayCredentials

type WechatPayCredentials struct {
	Signer auth.Signer // 数字签名生成器
}

WechatPayCredentials 微信支付请求报文头 Authorization 信息生成器

func (*WechatPayCredentials) GenerateAuthorizationHeader

func (c *WechatPayCredentials) GenerateAuthorizationHeader(
	ctx context.Context, method, canonicalURL, signBody string,
) (string, error)

GenerateAuthorizationHeader 生成请求报文头中的 Authorization 信息,详见: https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/qian-ming-sheng-cheng

Jump to

Keyboard shortcuts

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