socialpay

package
v1.2.36 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SocialPayInvoicePhone = utils.API{
		Url:    "/pos/invoice/phone",
		Method: http.MethodPost,
	}
	SocialPayInvoiceQr = utils.API{
		Url:    "/pos/invoice/qr",
		Method: http.MethodPost,
	}
	SocialPayInvoiceCancel = utils.API{
		Url:    "/pos/invoice/cancel",
		Method: http.MethodPost,
	}
	SocialPayInvoiceCheck = utils.API{
		Url:    "/pos/invoice/check",
		Method: http.MethodPost,
	}
	SocialPayPaymentCancel = utils.API{
		Url:    "/pos/payment/cancel",
		Method: http.MethodPost,
	}
	SocialPayPaymentSettlement = utils.API{
		Url:    "/pos/settlement",
		Method: http.MethodPost,
	}
)

SocialPay

Functions

This section is empty.

Types

type Body

type Body struct {
	Response map[string]interface{} `json:"response"`
	Error    map[string]interface{} `json:"error"`
}
type Header struct {
	Status string `json:"status"`
	Code   int    `json:"code"`
}

type Response

type Response struct {
	Header Header `json:"header"`
	Body   Body   `json:"body"`
}

type SocialPay

type SocialPay interface {
	InvoicePhone(amount float64, invoice, phone string) (SocialPaySimpleResponse, error)
	InvoiceQR(amount float64, invoice string) (SocialPaySimpleResponse, error)
	CheckTransaction(amount float64, invoice string) (SocialPayTransactionResponse, error)
	CancelInvoice(amount float64, invoice string) (SocialPaySimpleResponse, error)
	CancelTransaction(amount float64, invoice string) (SocialPayTransactionResponse, error)
	TransactionSettlement(settlementId string) (SocialPayPaymentSettlementResponse, error)
}

func New

func New(terminal, secret, endpoint string) SocialPay

type SocialPayErrorResponse

type SocialPayErrorResponse struct {
	ErrorDescription string `json:"errorDesc"`
	ErrorType        string `json:"errorType"`
}

type SocialPayInvoicePhoneRequest

type SocialPayInvoicePhoneRequest struct {
	Phone    string `json:"phone"`
	Amount   string `json:"amount"`
	Invoice  string `json:"invoice"`
	Terminal string `json:"terminal"`
	Checksum string `json:"checksum"`
}

type SocialPayInvoiceSimpleRequest

type SocialPayInvoiceSimpleRequest struct {
	Amount   string `json:"amount"`
	Invoice  string `json:"invoice"`
	Terminal string `json:"terminal"`
	Checksum string `json:"checksum"`
}

type SocialPayPaymentSettlementResponse

type SocialPayPaymentSettlementResponse struct {
	Amount float64 `json:"amount"`
	Count  int     `json:"count"`
	Status string  `json:"status"`
}

type SocialPaySettlementRequest

type SocialPaySettlementRequest struct {
	SettlementId string `json:"settlementId"`
	Checksum     string `json:"checksum"`
	Terminal     string `json:"terminal"`
}

type SocialPaySimpleResponse

type SocialPaySimpleResponse struct {
	Description string `json:"desc"`
	Status      string `json:"status"`
}

type SocialPayTransactionResponse

type SocialPayTransactionResponse struct {
	ApprovalCode        string  `json:"approval_code"`
	Amount              float64 `json:"amount"`
	CardNumber          string  `json:"card_number"`
	ResponseDescription string  `json:"resp_desc"`
	ResponseCode        string  `json:"resp_code"`
	Terminal            string  `json:"terminal"`
	Invoice             string  `json:"invoice"`
	Checksum            string  `json:"checksum"`
}

type UPointCheckUserInfoInput added in v1.2.11

type UPointCheckUserInfoInput struct {
	CardNumber string `json:"card_number"`
	Mobile     string `json:"mobile"`
	PinCode    string `json:"pin_code"`
}

type UpointProcessTransactionInput added in v1.2.11

type UpointProcessTransactionInput struct {
	Mobile     string `json:"mobile"`
	CardNumber string `json:"card_number"`
}

Jump to

Keyboard shortcuts

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