zibal

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentResponse

type PaymentResponse struct {
	Result  int    `json:"result"`
	TrackID int    `json:"trackId"`
	Message string `json:"message"`
}

type VerificationRequest

type VerificationRequest struct {
	Merchant string `json:"merchant" validate:"required"`
	TrackID  int    `json:"trackId" validate:"required"`
}

type VerificationResponse

type VerificationResponse struct {
	PaidAt      string `json:"paidAt"`
	Amount      int    `json:"amount"`
	Result      int    `json:"result"`
	Status      int    `json:"status"`
	RefNumber   int    `json:"refNumber"`
	Description string `json:"description"`
	CardNumber  string `json:"cardNumber"`
	OrderID     string `json:"orderId"`
	Message     string `json:"message"`
}

type Zibal

type Zibal struct {
	// contains filtered or unexported fields
}

func New

func New(client client.Transporter, merchant string) (*Zibal, error)

New creates a zibal provider object for user factory request methods

func (*Zibal) RequestPayment

func (z *Zibal) RequestPayment(ctx context.Context, amount uint, callBackUrl, description string) (*PaymentResponse, error)

RequestPayment creates a payment request and returns a status code and authority.

func (*Zibal) VerifyPayment

func (z *Zibal) VerifyPayment(ctx context.Context, trackID int) (*VerificationResponse, error)

VerifyPayment verifies a payment and returns the payment details.

Jump to

Keyboard shortcuts

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