Documentation ¶
Index ¶
- Constants
- Variables
- func NewCardPayHttpClientStatusOk() *http.Client
- func NewClientStatusOk() *http.Client
- type CardPayAddress
- type CardPayBankCardAccount
- type CardPayCardAccount
- type CardPayCryptoCurrencyAccount
- type CardPayCustomer
- type CardPayEWalletAccount
- type CardPayItem
- type CardPayMerchantOrder
- type CardPayOrder
- type CardPayOrderRecurringResponse
- type CardPayOrderRecurringResponseRecurringData
- type CardPayOrderResponse
- type CardPayPaymentData
- type CardPayRecurringData
- type CardPayRecurringDataFiling
- type CardPayRecurringDataResponse
- type CardPayRecurringPlan
- type CardPayRecurringPlanData
- type CardPayRecurringPlanRequest
- type CardPayRecurringPlanResponse
- type CardPayRecurringSubscription
- type CardPayRecurringSubscriptionRequest
- type CardPayRecurringSubscriptionResponse
- type CardPayRecurringSubscriptionUpdateRequest
- type CardPayRefundData
- type CardPayRefundRequest
- type CardPayRefundResponse
- type CardPayRefundResponseCustomer
- type CardPayRefundResponsePaymentData
- type CardPayRefundResponseRefundData
- type CardPayRequest
- type CardPayReturnUrls
- type CardPaySubscriptionDataRequest
- type PaymentSystemInterface
- type PaymentSystemManagerInterface
- type TransportCardPayOk
- type TransportCardPayRecurringPlanInactive
- type TransportCardPayRecurringPlanOk
- type TransportStatusError
- type TransportStatusOk
Constants ¶
View Source
const (
CardPayDateFormat = "2006-01-02T15:04:05Z"
)
Variables ¶
View Source
var ( PaymentSystemErrorHandlerNotFound = errors.NewBillingServerErrorMsg("ph000001", "handler for specified payment system not found") PaymentSystemErrorEWalletIdentifierIsInvalid = errors.NewBillingServerErrorMsg("ph000005", "wallet identifier is invalid") PaymentSystemErrorRequestAmountOrCurrencyIsInvalid = errors.NewBillingServerErrorMsg("ph000011", "amount or currency from request not match with value in order") PaymentSystemErrorRefundRequestAmountOrCurrencyIsInvalid = errors.NewBillingServerErrorMsg("ph000012", "amount or currency from request not match with value in refund") PaymentSystemErrorRequestTemporarySkipped = errors.NewBillingServerErrorMsg("ph000013", "notification skipped with temporary status") )
Functions ¶
func NewClientStatusOk ¶
Types ¶
type CardPayAddress ¶
type CardPayBankCardAccount ¶
type CardPayCardAccount ¶
type CardPayCardAccount struct { BillingAddress *CardPayAddress `json:"billing_address,omitempty"` Card *CardPayBankCardAccount `json:"card"` Token string `json:"token,omitempty"` }
type CardPayCryptoCurrencyAccount ¶
type CardPayCryptoCurrencyAccount struct {
RollbackAddress string `json:"rollback_address"`
}
type CardPayCustomer ¶
type CardPayEWalletAccount ¶
type CardPayEWalletAccount struct {
Id string `json:"id"`
}
type CardPayItem ¶
type CardPayMerchantOrder ¶
type CardPayMerchantOrder struct { Id string `json:"id" validate:"required,hexadecimal"` Description string `json:"description,omitempty"` Items []*CardPayItem `json:"items,omitempty"` ShippingAddress *CardPayAddress `json:"shipping_address,omitempty"` }
type CardPayOrder ¶
type CardPayOrder struct { Request *CardPayRequest `json:"request"` MerchantOrder *CardPayMerchantOrder `json:"merchant_order"` Description string `json:"description"` PaymentMethod string `json:"payment_method"` PaymentData *CardPayPaymentData `json:"payment_data,omitempty"` RecurringData *CardPayRecurringData `json:"recurring_data,omitempty"` CardAccount *CardPayCardAccount `json:"card_account,omitempty"` Customer *CardPayCustomer `json:"customer"` EWalletAccount *CardPayEWalletAccount `json:"ewallet_account,omitempty"` CryptoCurrencyAccount *CardPayCryptoCurrencyAccount `json:"cryptocurrency_account,omitempty"` ReturnUrls *CardPayReturnUrls `json:"return_urls,omitempty"` }
type CardPayOrderRecurringResponse ¶
type CardPayOrderRecurringResponse struct {
RecurringData *CardPayOrderRecurringResponseRecurringData `json:"recurring_data"`
}
func (*CardPayOrderRecurringResponse) IsSuccessStatus ¶
func (h *CardPayOrderRecurringResponse) IsSuccessStatus() bool
type CardPayOrderRecurringResponseRecurringData ¶
type CardPayOrderRecurringResponseRecurringData struct { Id string `json:"id"` Filing *CardPayRecurringDataFiling `json:"filing"` Status string `json:"status"` Amount float64 `json:"amount"` Currency string `json:"currency"` Created string `json:"created"` Note string `json:"note"` Rrn string `json:"rrn"` Is3D bool `json:"is_3d"` }
type CardPayOrderResponse ¶
type CardPayOrderResponse struct {
RedirectUrl string `json:"redirect_url"`
}
type CardPayPaymentData ¶
type CardPayRecurringData ¶
type CardPayRecurringData struct { Currency string `json:"currency"` Amount float64 `json:"amount"` Filing *CardPayRecurringDataFiling `json:"filing,omitempty"` Descriptor string `json:"dynamic_descriptor"` Note string `json:"note"` Initiator string `json:"initiator"` Plan *CardPayRecurringPlan `json:"plan"` }
type CardPayRecurringDataFiling ¶
type CardPayRecurringDataFiling struct {
Id string `json:"id"`
}
type CardPayRecurringDataResponse ¶
type CardPayRecurringDataResponse struct {
Id string `json:"id"`
}
type CardPayRecurringPlan ¶
type CardPayRecurringPlan struct {
Id string `json:"id"`
}
type CardPayRecurringPlanRequest ¶
type CardPayRecurringPlanRequest struct { Request *CardPayRequest `json:"request"` PlanData *CardPayRecurringPlanData `json:"plan_data"` }
type CardPayRecurringPlanResponse ¶
type CardPayRecurringPlanResponse struct {
PlanData *CardPayRecurringPlanData `json:"plan_data"`
}
type CardPayRecurringSubscription ¶
type CardPayRecurringSubscription struct {
Id string `json:"id"`
}
type CardPayRecurringSubscriptionRequest ¶
type CardPayRecurringSubscriptionRequest struct { Request *CardPayRequest `json:"request"` CardAccount *CardPayCardAccount `json:"card_account"` Customer *CardPayCustomer `json:"customer"` MerchantOrder *CardPayMerchantOrder `json:"merchant_order"` PaymentMethod string `json:"payment_method"` RecurringData *CardPayRecurringData `json:"recurring_data"` ReturnUrls *CardPayReturnUrls `json:"return_urls"` }
type CardPayRecurringSubscriptionResponse ¶
type CardPayRecurringSubscriptionResponse struct { RedirectUrl string `json:"redirect_url"` RecurringDataResponse *CardPayRecurringDataResponse `json:"recurring_data"` RecurringSubscription *CardPayRecurringSubscription `json:"subscription"` }
type CardPayRecurringSubscriptionUpdateRequest ¶
type CardPayRecurringSubscriptionUpdateRequest struct { Request *CardPayRequest `json:"request"` Operation string `json:"operation"` SubscriptionData *CardPaySubscriptionDataRequest `json:"subscription_data"` }
type CardPayRefundData ¶
type CardPayRefundRequest ¶
type CardPayRefundRequest struct { Request *CardPayRequest `json:"request"` MerchantOrder *CardPayMerchantOrder `json:"merchant_order"` PaymentData *CardPayRecurringDataFiling `json:"payment_data"` RefundData *CardPayRefundData `json:"refund_data"` }
type CardPayRefundResponse ¶
type CardPayRefundResponse struct { PaymentMethod string `json:"payment_method"` MerchantOrder *CardPayMerchantOrder `json:"merchant_order"` RefundData *CardPayRefundResponseRefundData `json:"refund_data"` PaymentData *CardPayRefundResponsePaymentData `json:"payment_data"` Customer *CardPayRefundResponseCustomer `json:"customer"` CardAccount interface{} `json:"card_account,omitempty"` EwalletAccount interface{} `json:"ewallet_account,omitempty"` }
func (*CardPayRefundResponse) IsSuccessStatus ¶
func (m *CardPayRefundResponse) IsSuccessStatus() bool
type CardPayRequest ¶
type CardPayReturnUrls ¶
type CardPaySubscriptionDataRequest ¶
type CardPaySubscriptionDataRequest struct {
StatusTo string `json:"status_to"`
}
type PaymentSystemInterface ¶
type PaymentSystemInterface interface { CreatePayment(order *billingpb.Order, successUrl, failUrl string, requisites map[string]string) (string, error) ProcessPayment(order *billingpb.Order, message proto.Message, raw, signature string) error IsRecurringCallback(request proto.Message) bool CanSaveCard(request proto.Message) bool GetRecurringId(request proto.Message) string CreateRefund(order *billingpb.Order, refund *billingpb.Refund) error ProcessRefund(order *billingpb.Order, refund *billingpb.Refund, message proto.Message, raw, signature string) error CreateRecurringSubscription(order *billingpb.Order, subscription *recurringpb.Subscription, successUrl, failUrl string, requisites map[string]string) (string, error) IsSubscriptionCallback(request proto.Message) bool DeleteRecurringSubscription(order *billingpb.Order, subscription *recurringpb.Subscription) error }
func NewCardPayHandler ¶
func NewCardPayHandler() PaymentSystemInterface
type PaymentSystemManagerInterface ¶
type PaymentSystemManagerInterface interface {
GetGateway(name string) (PaymentSystemInterface, error)
}
type TransportCardPayOk ¶
type TransportCardPayOk struct {
Transport http.RoundTripper
}
type TransportCardPayRecurringPlanInactive ¶
type TransportCardPayRecurringPlanInactive struct {
Transport http.RoundTripper
}
type TransportCardPayRecurringPlanOk ¶
type TransportCardPayRecurringPlanOk struct {
Transport http.RoundTripper
}
type TransportStatusError ¶
type TransportStatusError struct {
Transport http.RoundTripper
}
type TransportStatusOk ¶
type TransportStatusOk struct { Transport http.RoundTripper Err error }
Click to show internal directories.
Click to hide internal directories.