Documentation ¶
Index ¶
- Constants
- type AlipayPaymentProvider
- func (pp *AlipayPaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *AlipayPaymentProvider) GetResponseError(err error) string
- func (pp *AlipayPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *AlipayPaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type BalancePaymentProvider
- func (pp *BalancePaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *BalancePaymentProvider) GetResponseError(err error) string
- func (pp *BalancePaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *BalancePaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type DummyPaymentProvider
- func (pp *DummyPaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *DummyPaymentProvider) GetResponseError(err error) string
- func (pp *DummyPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *DummyPaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type GcInvoiceReqInfo
- type GcInvoiceRespInfo
- type GcNotifyRespInfo
- type GcPayReqInfo
- type GcPayRespInfo
- type GcPaymentProvider
- func (pp *GcPaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *GcPaymentProvider) GetResponseError(err error) string
- func (pp *GcPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *GcPaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type GcRequestBody
- type GcResponseBody
- type NotifyResult
- type PayReq
- type PayResp
- type PaymentProvider
- type PaymentState
- type PaypalPaymentProvider
- func (pp *PaypalPaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *PaypalPaymentProvider) GetResponseError(err error) string
- func (pp *PaypalPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *PaypalPaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type StripePaymentProvider
- func (pp *StripePaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *StripePaymentProvider) GetResponseError(err error) string
- func (pp *StripePaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *StripePaymentProvider) Pay(r *PayReq) (*PayResp, error)
- type WechatPayNotifyResponse
- type WechatPaymentProvider
- func (pp *WechatPaymentProvider) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, ...) (string, error)
- func (pp *WechatPaymentProvider) GetResponseError(err error) string
- func (pp *WechatPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
- func (pp *WechatPaymentProvider) Pay(r *PayReq) (*PayResp, error)
Constants ¶
View Source
const (
PaymentEnvWechatBrowser = "WechatBrowser"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlipayPaymentProvider ¶
func (*AlipayPaymentProvider) GetInvoice ¶ added in v1.44.9
func (*AlipayPaymentProvider) GetResponseError ¶ added in v1.324.0
func (pp *AlipayPaymentProvider) GetResponseError(err error) string
func (*AlipayPaymentProvider) Notify ¶ added in v1.29.0
func (pp *AlipayPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type BalancePaymentProvider ¶ added in v1.640.0
type BalancePaymentProvider struct{}
func NewBalancePaymentProvider ¶ added in v1.640.0
func NewBalancePaymentProvider() (*BalancePaymentProvider, error)
func (*BalancePaymentProvider) GetInvoice ¶ added in v1.640.0
func (*BalancePaymentProvider) GetResponseError ¶ added in v1.640.0
func (pp *BalancePaymentProvider) GetResponseError(err error) string
func (*BalancePaymentProvider) Notify ¶ added in v1.640.0
func (pp *BalancePaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type DummyPaymentProvider ¶ added in v1.327.0
type DummyPaymentProvider struct{}
func NewDummyPaymentProvider ¶ added in v1.327.0
func NewDummyPaymentProvider() (*DummyPaymentProvider, error)
func (*DummyPaymentProvider) GetInvoice ¶ added in v1.327.0
func (*DummyPaymentProvider) GetResponseError ¶ added in v1.327.0
func (pp *DummyPaymentProvider) GetResponseError(err error) string
func (*DummyPaymentProvider) Notify ¶ added in v1.327.0
func (pp *DummyPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type GcInvoiceReqInfo ¶ added in v1.44.9
type GcInvoiceRespInfo ¶ added in v1.44.9
type GcNotifyRespInfo ¶ added in v1.29.0
type GcNotifyRespInfo struct { Xmpch string `json:"xmpch"` OrderDate string `json:"orderdate"` OrderNo string `json:"orderno"` Amount float64 `json:"amount"` Jylsh string `json:"jylsh"` TradeNo string `json:"tradeno"` PayMethod string `json:"paymethod"` OrderState string `json:"orderstate"` ReturnType string `json:"return_type"` PayerId string `json:"payerid"` PayerName string `json:"payername"` }
type GcPayReqInfo ¶ added in v1.29.0
type GcPayReqInfo struct { OrderDate string `json:"orderdate"` OrderNo string `json:"orderno"` Amount string `json:"amount"` Xmpch string `json:"xmpch"` Body string `json:"body"` ReturnUrl string `json:"return_url"` NotifyUrl string `json:"notify_url"` PayerId string `json:"payerid"` PayerName string `json:"payername"` Remark1 string `json:"remark1"` Remark2 string `json:"remark2"` }
type GcPayRespInfo ¶ added in v1.29.0
type GcPaymentProvider ¶ added in v1.29.0
func NewGcPaymentProvider ¶ added in v1.29.0
func NewGcPaymentProvider(clientId string, clientSecret string, host string) *GcPaymentProvider
func (*GcPaymentProvider) GetInvoice ¶ added in v1.44.9
func (*GcPaymentProvider) GetResponseError ¶ added in v1.324.0
func (pp *GcPaymentProvider) GetResponseError(err error) string
func (*GcPaymentProvider) Notify ¶ added in v1.29.0
func (pp *GcPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type GcRequestBody ¶ added in v1.29.0
type GcResponseBody ¶ added in v1.29.0
type NotifyResult ¶ added in v1.377.2
type PaymentProvider ¶
type PaymentProvider interface { Pay(req *PayReq) (*PayResp, error) Notify(body []byte, orderId string) (*NotifyResult, error) GetInvoice(paymentName string, personName string, personIdCard string, personEmail string, personPhone string, invoiceType string, invoiceTitle string, invoiceTaxId string) (string, error) GetResponseError(err error) string }
type PaymentState ¶ added in v1.377.2
type PaymentState string
const ( PaymentStatePaid PaymentState = "Paid" PaymentStateCreated PaymentState = "Created" PaymentStateCanceled PaymentState = "Canceled" PaymentStateTimeout PaymentState = "Timeout" PaymentStateError PaymentState = "Error" )
type PaypalPaymentProvider ¶ added in v1.326.1
func NewPaypalPaymentProvider ¶ added in v1.326.1
func NewPaypalPaymentProvider(clientID string, secret string) (*PaypalPaymentProvider, error)
func (*PaypalPaymentProvider) GetInvoice ¶ added in v1.326.1
func (*PaypalPaymentProvider) GetResponseError ¶ added in v1.326.1
func (pp *PaypalPaymentProvider) GetResponseError(err error) string
func (*PaypalPaymentProvider) Notify ¶ added in v1.326.1
func (pp *PaypalPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type StripePaymentProvider ¶ added in v1.390.0
type StripePaymentProvider struct { PublishableKey string SecretKey string // contains filtered or unexported fields }
func NewStripePaymentProvider ¶ added in v1.390.0
func NewStripePaymentProvider(PublishableKey, SecretKey string) (*StripePaymentProvider, error)
func (*StripePaymentProvider) GetInvoice ¶ added in v1.390.0
func (*StripePaymentProvider) GetResponseError ¶ added in v1.390.0
func (pp *StripePaymentProvider) GetResponseError(err error) string
func (*StripePaymentProvider) Notify ¶ added in v1.390.0
func (pp *StripePaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
type WechatPayNotifyResponse ¶ added in v1.324.0
type WechatPaymentProvider ¶ added in v1.290.0
type WechatPaymentProvider struct { Client *wechat.ClientV3 AppId string }
func NewWechatPaymentProvider ¶ added in v1.290.0
func (*WechatPaymentProvider) GetInvoice ¶ added in v1.290.0
func (*WechatPaymentProvider) GetResponseError ¶ added in v1.324.0
func (pp *WechatPaymentProvider) GetResponseError(err error) string
func (*WechatPaymentProvider) Notify ¶ added in v1.290.0
func (pp *WechatPaymentProvider) Notify(body []byte, orderId string) (*NotifyResult, error)
Click to show internal directories.
Click to hide internal directories.