Documentation
¶
Index ¶
Constants ¶
View Source
const ( // App 在App支付 App = iota + 1 // Web 在网页上支付 Web )
Variables ¶
Functions ¶
Types ¶
type Account ¶
type Account struct { Debug bool `json:"debug"` AppID string `json:"appID"` //即AppID AppSecret string `json:"appSecret"` //即AppKey MerchantID string `json:"merchantID"` //商家ID PublicKey string `json:"publicKey"` //公钥 PrivateKey string `json:"privateKey"` //私钥 CertPath string `json:"certPath"` //证书路径 WebhookID string `json:"webhookID"` // paypal使用的webhook id Options Options `json:"options"` //其它选项 }
Account 付款平台账号参数
func NewAccount ¶
func NewAccount() *Account
type Currency ¶ added in v0.0.5
type Currency string
Currency 币种
const ( // USD 美元 USD Currency = `USD` // CNY 人民币 CNY Currency = `CNY` // RUB 俄罗斯卢布 RUB Currency = `RUB` // EUR 欧元 EUR Currency = `EUR` // GBP 英镑 GBP Currency = `GBP` // HKD 港元 HKD Currency = `HKD` // JPY 日元 JPY Currency = `JPY` // KRW 韩元 KRW Currency = `KRW` // AUD 澳元 AUD Currency = `AUD` // CAD 加元 CAD Currency = `CAD` )
type Pay ¶
type Pay struct { Platform string //付款平台(alipay/wechat/paypal) Device Device //付款时的设备 NotifyURL string //接收付款结果通知的网址 ReturnURL string //支付操作后返回的网址 Subject string //主题描述 OutTradeNo string //业务方的交易号(我们的订单号) Amount float64 //支付金额 Currency Currency //币种 GoodsType GoodsType //商品类型 PassbackParams string //回传参数 Options echo.H //其它选项 }
Pay 付款参数
func (*Pay) DeviceType ¶
func (*Pay) GoodsTypeName ¶
type Refund ¶
type Refund struct { Platform string //付款平台 TradeNo string //付款平台的交易号 OutTradeNo string //业务方的交易号(我们的订单号) OutRefundNo string //业务方退单号(aliapy可不传) TotalAmount float64 //订单总金额(alipay可不传) RefundAmount float64 //退款金额 RefundReason string //退款原因(选填) Currency Currency //币种 Options echo.H //其它选项 }
Refund 退款参数
Click to show internal directories.
Click to hide internal directories.