baidupay

package module
v0.0.0-...-f535f45 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 2 Imported by: 0

README

baidupay

百度收银台支付

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// 调起支付
	UnionOrder(*eto.UnionOrderReq) (*eto.UnionOrderRes, error)
	// 支付回调
	ParseUnionOrderNotify(body []byte) (*eto.UnionOrderNotify, error)
	// 回调响应
	NotifyResponse(error) (string, error)
	// 取消核销
	SyncOrderStatus(*eto.SyncOrderStatusReq) error
	// 申请退款
	ApplyOrderRefund(*eto.ApplyOrderRefundReq) (*eto.ApplyOrderRefundResp, error)
	// 退款回调
	ParseRefundNotify(body []byte) (*eto.RefundNotify, error)
	// 请求业务方退款审核
	ParseRefundAudit(body []byte) (*eto.OrderRefundAuditNotify, error)
	// 支付回调响应
	PayNotifyResponse(err error) (string, error)
}

func NewClient

func NewClient(conf *PayConfig) (Client, error)

type PayConfig

type PayConfig struct {
	DealID               string `json:"deal_id"`
	AppID                string `json:"app_id"`
	AppKey               string `json:"app_key"`
	PrivateKey           []byte `json:"private_key"`
	PublicKey            []byte `json:"public_key"`
	PlatformRsaPublicKey []byte `json:"platform_rsa_public_key"`

	WhiteClientIP []string `json:"white_client_ip"`
	DebugMode     bool     `json:"debug_mode"`
	IsDefault     bool     `json:"default"` // 是否是默认客户端
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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