Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidRequest = errors.New("Invalid CheckKey. Please check your CheckKey") ErrInvalidAccount = errors.New("Invalid Account. Please check your dealer code, username and password.") ErrVirtualPosNotFound = errors.New("There is no Virtual Pos associated with your account.") ErrDailyDealerLimitExceeded = errors.New("Dealer exceeded one of the daily limits.") ErrDailyCardLimitExceeded = errors.New("This Credit Card is delimitated.") ErrInvalidCardInfo = errors.New("Invalid Card Info.") ErrThreeDRequired = errors.New("Dealer can't do Non-3D payment.") ErrInstallmentWithForeignCurrency = errors.New("Can't make installments with foreign currency.") ErrInstallmentNumberForDealer = errors.New("This number of installments is not available for dealer.") ErrInvalidInstallmentNumber = errors.New("Installment Number must be between 2 and 12") )
Functions ¶
This section is empty.
Types ¶
type BuyerInformation ¶
type BuyerInformation struct {
FullName string `json:"BuyerFullName,omitempty"`
EMail string `json:"BuyerEmail,omitempty"`
GSMNumber string `json:"BuyerGsmNumber,omitempty"`
Address string `json:"BuyerAddress,omitempty"`
}
BuyerInformation represents
type CustomerInformation ¶
type CustomerInformation struct {
DealerCustomerID int `json:"DealerCustomerId,omitempty"`
CustomerCode string `json:"CustomerCode,omitempty"`
FirstName string `json:"FirstName,omitempty"`
LastName string `json:"LastName,omitempty"`
Gender int8 `json:"Gender,omitempty"`
BirthDate string `json:"BirthDate,omitempty"`
GsmNumber string `json:"GsmNumber,omitempty"`
EMail string `json:"Email,omitempty"`
Address string `json:"Address,omitempty"`
}
type Moka ¶
type Moka struct {
Dealer PaymentDealerAuthentication
Client *http.Client
// contains filtered or unexported fields
}
func (*Moka) PaymentNonThreeD ¶
func (m *Moka) PaymentNonThreeD(pdr PaymentDealerRequest) (Response, error)
func (*Moka) PaymentWithThreeD ¶
func (m *Moka) PaymentWithThreeD(pdr PaymentDealerRequest) (Response, error)
type NonTDResponse ¶
type NonTDResponse struct {
Data struct {
IsSuccessful bool `json:"IsSuccessful"`
ResultCode string `json:"ResultCode"`
ResultMessage string `json:"ResultMessage"`
VirtualPostOrderID string `json:"VirtualPostOrderId"`
} `json:"Data"`
ResultCode string `json:"ResultCode"`
ResultMessage string `json:"ResultMessage"`
Exception string `json:"Exception"`
}
func (NonTDResponse) Error ¶
func (r NonTDResponse) Error() (err error)
func (NonTDResponse) MarshalEasyJSON ¶
func (v NonTDResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (NonTDResponse) MarshalJSON ¶
func (v NonTDResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*NonTDResponse) UnmarshalEasyJSON ¶
func (v *NonTDResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NonTDResponse) UnmarshalJSON ¶
func (v *NonTDResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PaymentDealerRequest ¶
type PaymentDealerRequest struct {
VirtualPosOrderID string `json:"VirtualPosOrderId,omitempty"`
CardHolderFullName string `json:"CardHolderFullName,omitempty"`
CardNumber string `json:"CardNumber,omitempty"`
ExpMonth string `json:"ExpMonth,omitempty"`
ExpYear string `json:"ExpYear,omitempty"`
CvcNumber string `json:"CvcNumber,omitempty"`
Amount uint `json:"Amount,omitempty"`
Currency string `json:"Currency,omitempty"`
InstallmentNumber int8 `json:"InstallmentNumber,omitempty"`
ClientIP string `json:"ClientIP,omitempty"`
RedirectURL string `json:"RedirectUrl,omitempty"`
RedirectType int8 `json:"RedirectType,omitempty"`
OtherTrxCode string `json:"OtherTrxCode,omitempty"`
IsPreAuth int8 `json:"IsPreAuth,omitempty"`
IsPoolPayment int8 `json:"IsPoolPayment,omitempty"`
IsTokenized int8 `json:"IsTokenized,omitempty"`
IntegratorID int8 `json:"IntegratorId,omitempty"`
Software string `json:"Software,omitempty"`
SubMerchantName string `json:"SubMerchantName,omitempty"`
Description string `json:"Description,omitempty"`
BuyerInformation BuyerInformation `json:"BuyerInformation,omitempty"`
CustomerInformation CustomerInformation `json:"CustomerInformation,omitempty"`
}
PaymentDealerRequest represents a part of request that you send to moka services. For detailed documentation: https://developer.moka.com
type Request ¶
type Request struct {
PaymentDealerAuthentication PaymentDealerAuthentication `json:"PaymentDealrAuthentication"`
PaymentDealerRequest PaymentDealerRequest `json:"PaymentDealerRequest"`
}
func (Request) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Request) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Request) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Request) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ThreeDResponse ¶
type ThreeDResponse struct {
Data string `json:"Data"`
ResultCode string `json:"ResultCode"`
ResultMessage string `json:"ResultMessage"`
Exception string `json:"Exception"`
}
func (ThreeDResponse) Error ¶
func (r ThreeDResponse) Error() (err error)
func (ThreeDResponse) MarshalEasyJSON ¶
func (v ThreeDResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ThreeDResponse) MarshalJSON ¶
func (v ThreeDResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ThreeDResponse) UnmarshalEasyJSON ¶
func (v *ThreeDResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ThreeDResponse) UnmarshalJSON ¶
func (v *ThreeDResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface