umfPay

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHttp

func GetHttp(paramUrl string, data map[string]string, header map[string]string) (string, error)
"http://pay.soopay.net/spay/pay/payservice.do"

http-get paramUrl 请求url data 请求数据 header 请求头

func GetSign

func GetSign(data map[string]string, PRIVATE_KEY string) ([]byte, error)

联动优势签名

func RsaSign

func RsaSign(data, privateKey []byte) ([]byte, error)

私钥签名

func UmfPayVerifySig

func UmfPayVerifySig(data, PUBLIC_KEY string) error

联动优势验证签名 data: 传入参数,不能含有空格

func Utf8ToGbk

func Utf8ToGbk(s []byte) ([]byte, error)

UTF-8转GBK

func VerRsaSign

func VerRsaSign(data, publicKey, signature []byte) error

RSA公钥验证

Types

type Config

type Config struct {
	MER_ID      string `json:"mer_id"`
	URL_STR     string `json:"url_str"`
	NOTIFY_URL  string `json:"notify_url"`
	SERVER_IP   string `json:"server_ip"`
	PUBLIC_KEY  string `json:"public_key"`
	PRIVATE_KEY string `json:"private_key"`
}

func (*Config) UmfPayApp

func (c *Config) UmfPayApp(goodsId, goodsDesc, orderId, amount string) (umfRes, error)

Jump to

Keyboard shortcuts

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