VavvePaymentsGolang

package module
v1.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 13 Imported by: 0

README

Sample Payment library.


Added the details

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypting

func Decrypting(str string, secret string, salt string) string

func Encrypting

func Encrypting(str string, secret string, salt string) string

func GetPaymentList added in v1.0.8

func GetPaymentList(apiKey string, apiSecret string, merchantId string, createdDate string) *[]CardTransactionDetails

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int, after int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

Types

type CapturePayment

type CapturePayment struct {
	PaymentTransactionId int64  `json:"paymentTransactionId"`
	MerchantId           string `json:"merchantId"`
	PaymentMethodType    string `json:"paymentMethodType"`
}

type CardTransactionDetails added in v1.0.8

type CardTransactionDetails struct {
	PaymentTransactionId           int64   `json:"paymentTransactionId"`
	MerchantId                     string  `json:"merchantId"`
	MerchantOrderId                int64   `json:"merchantOrderId"`
	IpAddress                      string  `json:"ipAddress"`
	MachineName                    string  `json:"machineName"`
	RequestURL                     string  `json:"requestURL"`
	CreatedDate                    string  `json:"createdDate"`
	TotalOrderAmount               float32 `json:"totalOrderAmount"`
	CardNumberLast4Digit           string  `json:"cardNumberLast4Digit"`
	Currency                       string  `json:"currency"`
	Amount                         float32 `json:"amount"`
	PaymentType                    string  `json:"paymentType"`
	AvsCode                        string  `json:"avsCode"`
	AvsCodeRaw                     string  `json:"avsCodeRaw"`
	CardSubTypeId                  int64   `json:"cardSubTypeId"`
	CardTypeId                     string  `json:"cardTypeId"`
	CardVerificationResultCode     string  `json:"cardVerificationResultCode"`
	CvvStatus                      string  `json:"cvvStatus"`
	ErrorReason                    string  `json:"errorReason"`
	ErrorMessage                   string  `json:"errorMessage"`
	ErrorField                     string  `json:"errorField"`
	ErrorFieldReason               string  `json:"errorFieldReason"`
	HttpResponseCode               int16   `json:"httpResponseCode"`
	HttpResponseReason             string  `json:"httpResponseReason"`
	ProcessingStartTime            string  `json:"processingStartTime"`
	ProcessingEndTime              string  `json:"processingEndTime"`
	Status                         string  `json:"status"`
	InformationApprovalCode        int64   `json:"informationApprovalCode"`
	InformationResponseCode        int16   `json:"informationResponseCode"`
	OrderSubmitTimeUtc             string  `json:"orderSubmitTimeUtc"`
	ReconciliationId               string  `json:"reconciliationId"`
	ProcessorRefundId              string  `json:"processorRefundId"`
	TransactionId                  string  `json:"transactionId"`
	CapturePaymentResponseAmount   float32 `json:"capturePaymentResponseAmount"`
	CapturePaymentResponseCurrency string  `json:"capturePaymentResponseCurrency"`
	OldCardPaymentTransactionId    int64   `json:"oldCardPaymentTransactionId"`
	GeoLocationId                  string  `json:"geoLocationId"`
	PaymentThru                    string  `json:"paymentThru"`
	PaymentApp                     string  `json:"paymentApp"`
	PaymentAppType                 string  `json:"paymentAppType"`
	ModeOfPayment                  string  `json:"modeOfPayment"`
}

func GetPayment added in v1.0.8

func GetPayment(apiKey string, apiSecret string, merchantId string, transactionId int64) *CardTransactionDetails

type MessageLayer

type MessageLayer struct {
	Msgidentifier      string  `json:"msgidentifier"`
	MerchantId         string  `json:"merchantId"`
	OrderId            string  `json:"orderId"`
	TotalOrderAmount   float32 `json:"totalOrderAmount"`
	Amount             float32 `json:"amount"`
	Currency           string  `json:"currency"`
	Account            string  `json:"account"`
	Holdername         string  `json:"holdername"`
	Bankname           string  `json:"bankname"`
	BankId             int64   `json:"bankId"`
	Accounttype        string  `json:"accounttype"`
	Routingnumber      string  `json:"routingnumber"`
	Cvv2               string  `json:"cvv2"`
	Expiry             string  `json:"expiry"`            // format YYMM
	Modeofpayment      string  `json:"modeofpayment"`     // online or offline
	PaymentApp         string  `json:"paymentApp"`        // Appointment/Giftcard/etc
	PaymentAppType     string  `json:"paymentAppType"`    // Hosted/Self/API
	PaymentMethodType  string  `json:"paymentMethodType"` // card/ach/digital
	PaymentThru        string  `json:"paymentThru"`       // online or vavve
	RequestURL         string  `json:"requestURL"`
	Track              string  `json:"track"`
	Address1           string  `json:"address1"`
	Address2           string  `json:"address2"`
	City               string  `json:"city"`
	State              string  `json:"state"`
	Country            string  `json:"country"`
	Zipcode            string  `json:"zipcode"`
	Customerid         string  `json:"customerid"`
	Firstname          string  `json:"firstname"`
	Lastname           string  `json:"lastname"`
	Phone              string  `json:"phone"`
	Email              string  `json:"email"`
	ExitingStatus      string  `json:"exitingStatus"`
	MemberId           string  `json:"memberId"`
	MerchantLocationId int64   `json:"merchantLocationId"`
}

type PayemntResponse

type PayemntResponse struct {
	PaymentTransactionId       int64   `json:"paymentTransactionId"`
	MerchantOrderId            int64   `json:"merchantOrderId"`
	TotalOrderAmount           float32 `json:"totalOrderAmount"`
	RedirectURL                string  `json:"redirectURL"`
	Amount                     float32 `json:"amount"`
	Currency                   string  `json:"currency"`
	TransactionId              string  `json:"transactionId"`
	Status                     string  `json:"status"`
	HttpResponseCode           int16   `json:"httpResponseCode"`
	HttpResponseReason         string  `json:"httpResponseReason"`
	ErrorReason                string  `json:"errorReason"`
	ErrorMessage               string  `json:"errorMessage"`
	ErrorField                 string  `json:"errorField"`
	ErrorFieldReason           string  `json:"errorFieldReason"`
	InformationApprovalCode    int64   `json:"informationApprovalCode"`
	InformationResponseCode    int16   `json:"informationResponseCode"`
	AvsCode                    string  `json:"avsCode"`
	AvsCodeRaw                 string  `json:"avsCodeRaw"`
	ReconciliationId           string  `json:"reconciliationId"`
	OrderSubmitTimeUtc         string  `json:"orderSubmitTimeUtc"`
	CardVerificationResultCode string  `json:"cardVerificationResultCode"`
	CvvStatus                  string  `json:"cvvStatus"`
	RefundId                   string  `json:"refundId"`
	ProductId                  int64   `json:"productId"`
}

func AuthorizeAndCapturePayment

func AuthorizeAndCapturePayment(messageLayer *MessageLayer, apiKey string, apiSecret string) *PayemntResponse

func AuthorizePayment

func AuthorizePayment(messageLayer *MessageLayer, apiKey string, apiSecret string) *PayemntResponse

func CapturePaymentPost

func CapturePaymentPost(capturePayment *CapturePayment, apiKey string, apiSecret string) *PayemntResponse

func RefundAuthorizePayment

func RefundAuthorizePayment(refundPayment *RefundPayment, apiKey string, apiSecret string) *PayemntResponse

func RefundCapturePayment

func RefundCapturePayment(refundPayment *RefundPayment, apiKey string, apiSecret string) *PayemntResponse

func VoidAuthorizePayment

func VoidAuthorizePayment(voidPayment *VoidPayment, apiKey string, apiSecret string) *PayemntResponse

func VoidCapturePayment

func VoidCapturePayment(voidPayment *VoidPayment, apiKey string, apiSecret string) *PayemntResponse

func VoidRefundPayment

func VoidRefundPayment(voidPayment *VoidPayment, apiKey string, apiSecret string) *PayemntResponse

type Payment

type Payment struct {
	MerchantId          string    `json:"merchantId"`
	PaymentThru         string    `json:"paymentThru"`
	PaymentInfo         string    `json:"paymentInfo"`
	PaymentAuthId       string    `json:"paymentAuthId"`
	PaymentStatus       string    `json:"paymentStatus"`
	StoreDiscType       string    `json:"storeDiscType"`
	Amount              float32   `json:"amount"`
	TotalAmount         float32   `json:"totalAmount"`
	PaymentReferrenceId string    `json:"paymentReferrenceId"`
	CreatedBy           string    `json:"createdBy"`
	CreatedDate         time.Time `json:"createdDate"`
	UpdatedBy           string    `json:"updatedBy"`
	UpdatedDate         time.Time `json:"updatedDate"`
	Description         string    `json:"description"`
	MerchantLocationId  int64     `json:"merchantLocationId"`
	MemberId            string    `json:"memberId"`
	RedeemType          string    `json:"redeemType"`
	OrderId             string    `json:"orderId"`
	OrderType           string    `json:"orderType"`
}

type Product

type Product struct {
	OrderItemId     int64   `json:"orderItemId"`
	ProductId       string  `json:"productId"`
	ProductName     string  `json:"productName"`
	Price           float32 `json:"price"`
	Quantity        int32   `json:"quantity"`
	Itemdescription string  `json:"itemdescription"`
}

type RefundPayment

type RefundPayment struct {
	PaymentTransactionId int64   `json:"paymentTransactionId"`
	MerchantId           string  `json:"merchantId"`
	RefundAmount         float32 `json:"refundAmount"`
	Currency             string  `json:"currency"`
	PaymentMethodType    string  `json:"paymentMethodType"`
}

type VoidPayment

type VoidPayment struct {
	PaymentTransactionId int64   `json:"paymentTransactionId"`
	MerchantId           string  `json:"merchantId"`
	VoidPayment          float32 `json:"voidPayment"`
	Currency             string  `json:"currency"`
	PaymentMethodType    string  `json:"PaymentMethodType"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL