Versions in this module Expand all Collapse all v1 v1.0.0 Jan 6, 2022 Changes in this version + func GetHTTPStatusCode400ErrorMessage(response *http.Response) string + func InitConfig() bool + func RandStringBytes(n int) string + func Sha512Encrypt(input string) string + type CB struct + CreditBalance []struct{ ... } + type CBUser struct + CustomerMobile string + MarketCode string + type Configuration struct + Description string + Instalments int + MaxLimit json.Number + MinLimit json.Number + PaymentType string + ServiceCode string + type ConfigurationRequest struct + MarketCode string + type ConfigurationResponse struct + Configurations []Configuration + type ContactRequest struct + AddressLine1 string + AddressLine2 string + City string + CountryCode string + Name string + PhoneNumber string + State string + Zipcode string + type CustomerRequest struct + CustomerDOB string + CustomerEmail string + CustomerPID int + CustomerPhone string + FirstName string + LastName string + type Delivery struct + DeliveredAt string + FinalCaptureAmount int + OriginalAmount int + Status string + TransactionID string + type DeliveryRequest struct + DeliveredAt string + FinalCaptureAmount int + type Details struct + Error string + Field string + type Error struct + Code int + Message string + func (e Error) Error() string + type HTTPStatusCode400 struct + Details []Details + Message string + StatusCode int + type ItemRequest struct + Categories [][]string + CurrencyCode string + DiscountAmount int + Name string + Price float32 + Quantity int + Sku string + TaxAmount int + type Merchant struct + Host string + MarketCode string + MerchantKey string + MerchantSecret string + Salt string + Timeout time.Duration + Transport http.RoundTripper + Version string + func NewClient() *Merchant + func (m *Merchant) AddDelivery(tsr TransactionStatusRequest, dr DeliveryRequest) (Delivery, error) + func (m *Merchant) CreateRefund(rr RefundRequest) (Refund, error) + func (m *Merchant) CreateTransaction(tr TransactionRequest) (Transaction, error) + func (m *Merchant) GenerateSignatureCreateTransaction(OR OrderRequest) string + func (m *Merchant) GetConfiguration(cr ConfigurationRequest) (ConfigurationResponse, error) + func (m *Merchant) GetCreditBalance(um string) (CB, error) + func (m *Merchant) GetRefundStatus(rsr RefundStatusRequest) (Refund, error) + func (m *Merchant) GetTransactionStatus(tsr TransactionStatusRequest) (TransactionStatus, error) + func (m *Merchant) Healthcheck() (string, error) + type OrderRequest struct + Amount float32 + Currency string + DiscountAmount int + Language string + MarketCode string + MerchantReferenceNo string + ServiceCode string + ShippingAmount int + Signature string + TaxAmount int + type Refund struct + Amount json.Number + CreatedAt time.Time + Currency string + DeclinedReason string + MerchantRefundReference string + RefundID string + RefundedAt *time.Time + RequestID string + Status string + TransactionID string + type RefundRequest struct + Amount int + MerchantRefundReference string + Reason string + RequestID string + TransactionID string + type RefundStatusRequest struct + RefundID string + type ShippingServiceRequest struct + Name string + Priority string + ShippedAt string + Tracking string + type Transaction struct + PaymentURL string + Signature string + Token string + TokenExpiryTime time.Time + TransactionID string + type TransactionRequest struct + Billing ContactRequest + Customer CustomerRequest + Items []ItemRequest + Order OrderRequest + Shipping ContactRequest + ShippingService ShippingServiceRequest + type TransactionStatus struct + Amount json.Number + CreatedAt time.Time + PaymentStatus string + TransactionID string + type TransactionStatusRequest struct + TransactionID string