gateway

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// Purchase sends a purchase request to the driver's gateway.
	Purchase(invoice *invoice.Invoice) (string, error)
	// PayURL returns the url to redirect the user to for payment.
	PayURL(invoice *invoice.Invoice) string
	// GetDriverName returns the name of the driver.
	GetDriverName() string
	// Verify checks the payment status of the invoice.
	Verify(vReq interface{}) (*receipt.Receipt, error)
	// PayMethod returns the payment request method.
	PayMethod() string
	// SetClient sets the http client.
	SetClient(client httpClient.Client)
	// RenderRedirectForm renders the html form for redirect to payment page.
	RenderRedirectForm(invoice *invoice.Invoice) (string, error)
}

Driver is the interface that must be implemented by all drivers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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