Documentation
¶
Index ¶
- Constants
- type AliNotifyPayResponse
- type Base
- func (b *Base) BuildSign(signData map[string]string) string
- func (b *Base) BuildUrlEncode(kvPairs map[string]string) string
- func (b *Base) GetFullGatewayUrl(params string) string
- func (b *Base) MakeSign(signStr string) string
- func (b *Base) Request(uri string, bizContentParams map[string]string) (*BaseResponse, error)
- type BaseResponse
- type Config
- type Gateway
- type PayApp
- type PayBar
- type PayQr
- type PayWap
- type PayWeb
Constants ¶
View Source
const SignTypeRsa = "RSA"
View Source
const SignTypeRsa2 = "RSA2"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliNotifyPayResponse ¶
type AliNotifyPayResponse struct { NotifyType string `json:"notify_type"` NotifyId string `json:"notify_id"` NotifyTime string `json:"notify_time"` SignType string `json:"sign_type"` Sign string `json:"sign"` TransCurrency string `json:"trans_currency"` SettleCurrency string `json:"settle_currency"` PayCurrency string `json:"pay_currency"` PayAmount string `json:"pay_amount"` SettleTransRate string `json:"settle_trans_rate"` TransPayRate string `json:"trans_pay_rate"` RefundResetPaytoolList string `json:"refund_reset_paytool_list"` ChargeAmount string `json:"charge_amount"` ChargeFlags string `json:"charge_flags"` SettlementId string `json:"settlement_id"` AdvanceAmount string `json:"advance_amount"` NotifyActionType string `json:"notify_action_type"` DiscountAmount string `json:"discount_amount"` MdiscountAmount string `json:"mdiscount_amount"` UnfreezeAmount string `json:"unfreeze_amount"` AuthTradePayMode string `json:"auth_trade_pay_mode"` }
type Base ¶
type Base struct { Config *Config Http http.Client // Common Properties GatewayUrl string PublicKey *rsa.PublicKey PrivateKey *rsa.PrivateKey }
func (*Base) GetFullGatewayUrl ¶
type BaseResponse ¶
type BaseResponse struct {
Resp string
}
func NewBaseResponse ¶
func NewBaseResponse(resp string) *BaseResponse
func (*BaseResponse) ToJson ¶
func (w *BaseResponse) ToJson() (string, error)
func (*BaseResponse) ToMap ¶
func (w *BaseResponse) ToMap() (map[string]interface{}, error)
func (*BaseResponse) ToXml ¶
func (w *BaseResponse) ToXml() (string, error)
type Config ¶
type Config struct { UseSandbox bool `json:"use_sandbox" yaml:"use_sandbox"` AppId string `json:"app_id" yaml:"app_id"` Charset string `json:"charset" yaml:"charset"` Format string `json:"format" yaml:"format"` Version string `json:"version" yaml:"version"` SignType string `json:"sign_type" yaml:"sign_type"` AliPublicKey string `json:"ali_public_key" yaml:"ali_public_key"` RsaPrivateKey string `json:"rsa_private_key" yaml:"rsa_private_key"` LimitPay []string `json:"limit_pay" yaml:"limit_pay"` NotifyUrl string `json:"notify_url" yaml:"notify_url"` ReturnUrl string `json:"return_url" yaml:"return_url"` FeeType string `json:"fee_type" yaml:"fee_type"` }
func NewConfigWithJson ¶
func NewConfigWithYaml ¶
func (Config) CheckConfig ¶
func (Config) ParseConfig ¶
func (c Config) ParseConfig() interface{}
type Gateway ¶
type Gateway struct {
Base *Base
}
func (*Gateway) Request ¶
func (a *Gateway) Request(api payloads.UnionPaymentApi, params map[string]string) *payloads.UnionPaymentResult
Click to show internal directories.
Click to hide internal directories.