Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOrderAmountOver = errors.New("订单金额超限") ErrVerifySign = errors.New("异步通知验证签名未通过") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { KAppID string // 应用ID KPrivateKey string // 应用私钥 IsProduction bool // 是否是正式环境 AppPublicCertPath string // app公钥证书路径 AliPayRootCertPath string // alipay根证书路径 AliPayPublicCertPath string // alipay公钥证书路径 NotifyURL string // 异步通知地址 ReturnURL string // 支付后回调链接地址 }
Config 初始化配置文件
type Order ¶
type Order struct { ID string // 订单ID Subject string // 订单标题 TotalAmount float32 // 订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000] Code ProductCode // 销售产品码,与支付宝签约的产品码名称 }
type ProductCode ¶
type ProductCode string
const ( AppPay ProductCode = "QUICK_MSECURITY_PAY" // app支付 PhoneWebPay ProductCode = "QUICK_WAP_WAY" // 手机网站支付 LaptopWebPay ProductCode = "FAST_INSTANT_TRADE_PAY" // 电脑网站支付 )
Click to show internal directories.
Click to hide internal directories.