Documentation ¶
Index ¶
Constants ¶
View Source
const ( VANDAR_REQUEST_API_ENDPOINT = "/api/v3/send" VANDAR_REDIRECT_API_ENDPOINT = "/v3/" VANDAR_VERIFY_API_ENDPOINT = "/api/v3/verify" VANDAR_TRANSACTION_DETAIL_API_END_POINT = "/api/v3/transaction" )
View Source
const API_VERSION = "3"
View Source
const (
VANDAR_HOST = "https://ipg.vandar.io"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentResponse ¶
type TransactionDetailResponse ¶
type TransactionDetailResponse struct { Status *int `json:"status"` Amount *string `json:"amount"` TransId *int `json:"transId"` RefNumber *string `json:"refnumber"` TrackingCode *string `json:"trackingCode"` FactorNumber *string `json:"factorNumber"` Mobile *string `json:"mobile"` Description *string `json:"description"` CardNumber *string `json:"cardNumber"` CID *string `json:"CID"` CreatedAt *string `json:"createdAt"` PaymentDate *string `json:"paymentDate"` Code *int `json:"code"` }
type Vandar ¶
type Vandar struct { APIKey string `validate:"required"` // contains filtered or unexported fields }
func New ¶
func New(client client.Transporter, ApiKey string) (*Vandar, error)
New create vandar provider object for user factory request methods
func (*Vandar) RequestPayment ¶
func (v *Vandar) RequestPayment(ctx context.Context, amount int, callBackUrl, mobileNumber, factorNumber, nationalCode, validCardNumber, description string) (*PaymentResponse, error)
RequestPayment create payment request and return status code and authority document of field https://vandarpay.github.io/docs/ipg/#step-1
func (*Vandar) TransactionDetail ¶
func (v *Vandar) TransactionDetail(ctx context.Context, token string) (*TransactionDetailResponse, error)
TransactionDetail Transaction Detail get Transaction status doc https://vandarpay.github.io/docs/ipg/#step-3
func (*Vandar) VerifyPayment ¶
VerifyPayment transaction by merchant id, amount and authority to payment provider doc https://vandarpay.github.io/docs/ipg/#step-4
type VerifyResponse ¶
type VerifyResponse struct { Status int `json:"status"` Errors []string `json:"errors"` Amount string `json:"amount"` RealAmount int `json:"realAmount"` Wage string `json:"wage"` TransID int64 `json:"transId"` FactorNumber string `json:"factorNumber"` Mobile string `json:"mobile"` Description string `json:"description"` CardNumber string `json:"cardNumber"` PaymentDate string `json:"paymentDate"` Cid string `json:"cid"` Message string `json:"message"` }
Click to show internal directories.
Click to hide internal directories.