infrastructures

package
v0.0.0-...-6d4792c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const ApiUrl = "https://pay.sp-stage.us/api/v1/"
View Source
const MerchantId = "unicorn"
View Source
const PrivateKey = "20c20ee3-4173-4daa-87e5-dbcce8c7949d"

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	PostgreSQLConn string `yaml:"postresql_conn"`
}

type Config

type Config struct {
}

func (*Config) GetConf

func (c *Config) GetConf() *Conf

type InitPayData

type InitPayData struct {
	Amount           int    `json:"amount"`
	Currency         string `json:"currency"`
	CustomerEmail    string `json:"customer_email"`
	IpAddress        string `json:"ip_address"`
	OrderId          string `json:"order_id"`
	OrderDescription string `json:"order_description"`
	Platform         string `json:"platform"`
}

type OneClickPayData

type OneClickPayData struct {
	Amount           int    `json:"amount"`
	Currency         string `json:"currency"`
	CustomerEmail    string `json:"customer_email"`
	IpAddress        string `json:"ip_address"`
	OrderId          string `json:"order_id"`
	OrderDescription string `json:"order_description"`
	Platform         string `json:"platform"`
	RecurringToken   string `json:"recurring_token"`
	PaymentType      string `json:"payment_type"`
}

type PostgreSQLHandler

type PostgreSQLHandler struct {
	Conn *sql.DB
}

func (*PostgreSQLHandler) Connection

func (handler *PostgreSQLHandler) Connection() *sql.DB

func (*PostgreSQLHandler) Execute

func (handler *PostgreSQLHandler) Execute(statement string) (sql.Result, error)

func (*PostgreSQLHandler) Query

func (handler *PostgreSQLHandler) Query(statement string) (interfaces.IRow, error)

type PostgreSQLRow

type PostgreSQLRow struct {
	Rows *sql.Rows
}

func (PostgreSQLRow) Next

func (r PostgreSQLRow) Next() bool

func (PostgreSQLRow) Scan

func (r PostgreSQLRow) Scan(dest ...interface{}) error

type ProcessPayData

type ProcessPayData struct {
	Transactions map[string]struct {
		Id        string `json:"id"`
		Status    string `json:"status"`
		Operation string `json:"operation"`
		Card      struct {
			CardToken struct {
				Token string `json:"token"`
			} `json:"card_token"`
		} `json:"card"`
	} `json:"transactions"`
	Order struct {
		OrderId string `json:"order_id"`
		Status  string `json:"status"`
		Amount  int    `json:"amount"`
	} `json:"order"`
	Type string `json:"type"`
}

type RefundData

type RefundData struct {
	Amount  int    `json:"amount"`
	OrderId string `json:"order_id"`
}

type SolidPayments

func (*SolidPayments) InitPay

func (solid *SolidPayments) InitPay(orderId int) (DTO.PayForm, error)

func (*SolidPayments) OneClickPay

func (solid *SolidPayments) OneClickPay(orderId int) (bool, error)

func (*SolidPayments) ProcessPayment

func (solid *SolidPayments) ProcessPayment(body []byte) (bool, error)

func (*SolidPayments) Refund

func (solid *SolidPayments) Refund(orderId int) (bool, error)

func (*SolidPayments) StatusCheck

func (solid *SolidPayments) StatusCheck(orderId int) (bool, error)

type StatusCheckData

type StatusCheckData struct {
	OrderId string `json:"order_id"`
}

Jump to

Keyboard shortcuts

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