mellat

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPaymentRequest

func NewPaymentRequest(
	orderId string,
	amount uint64,
	callBackUrl string,
	payerId string,
) *paymentRequest

func NewVerifyRequest

func NewVerifyRequest(
	orderId string,
	saleOrderId string,
	saleReferenceId string,
) *verifyRequest

Types

type Mellat

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

func New

func New(client client.Transporter, username, password string) (*Mellat, error)

New create mellat object for create new request

func (*Mellat) CreateTransaction

func (m *Mellat) CreateTransaction(ctx context.Context, req *paymentRequest) (*PaymentResponse, error)

func (*Mellat) VerifyTransaction

func (m *Mellat) VerifyTransaction(ctx context.Context, req *verifyRequest) (*VerifyResponse, error)

type PaymentResponse

type PaymentResponse struct {
	XMLName xml.Name `xml:"Envelope"`
	Body    struct {
		XMLName xml.Name `xml:"Body"`
		BpPay   struct {
			XMLName xml.Name `xml:"bpPayRequestResponse"`
			Return  string   `xml:"return"`
		}
	}
	// contains filtered or unexported fields
}

func (*PaymentResponse) RefId

func (pr *PaymentResponse) RefId() string

func (*PaymentResponse) ResponseCode

func (pr *PaymentResponse) ResponseCode() int

type VerifyResponse

type VerifyResponse struct {
	XMLName xml.Name `xml:"Envelope"`
	Body    struct {
		XMLName xml.Name `xml:"Body"`
		BpPay   struct {
			XMLName xml.Name `xml:"bpVerifyRequestResponse"`
			Return  string   `xml:"return"`
		}
	}
	// contains filtered or unexported fields
}

func (*VerifyResponse) ResponseCode

func (vr *VerifyResponse) ResponseCode() int

Jump to

Keyboard shortcuts

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