Documentation ¶
Index ¶
- Constants
- type Conf
- type Config
- type InitPayData
- type OneClickPayData
- type PostgreSQLHandler
- type PostgreSQLRow
- type ProcessPayData
- type RefundData
- type SolidPayments
- func (solid *SolidPayments) InitPay(orderId int) (DTO.PayForm, error)
- func (solid *SolidPayments) OneClickPay(orderId int) (bool, error)
- func (solid *SolidPayments) ProcessPayment(body []byte) (bool, error)
- func (solid *SolidPayments) Refund(orderId int) (bool, error)
- func (solid *SolidPayments) StatusCheck(orderId int) (bool, error)
- type StatusCheckData
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 InitPayData ¶
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 ¶
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 ¶
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 SolidPayments ¶
type SolidPayments struct { interfaces.IOrderService interfaces.IUserService interfaces.ICartService }
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) StatusCheck ¶
func (solid *SolidPayments) StatusCheck(orderId int) (bool, error)
type StatusCheckData ¶
type StatusCheckData struct {
OrderId string `json:"order_id"`
}
Click to show internal directories.
Click to hide internal directories.