Documentation
¶
Index ¶
- Constants
- Variables
- type Tokipay
- type TokipayPaymentQrInput
- type TokipayPaymentQrRequest
- type TokipayPaymentRequestResponse
- type TokipayPaymentResponse
- type TokipayPaymentResponseExt
- type TokipayPaymentScanUserRequest
- type TokipayPaymentSentUserRequest
- type TokipayPaymentStatusDataResponse
- type TokipayPaymentStatusResponse
- type TokipayRefundInput
- type TokipayRefundRequest
Constants ¶
View Source
const ( OrderStatusPaid string = "COMPLETED" OrderStatusPending string = "PENDING" OrderStatusCanceled string = "EXPIRED" OrderStatusExpired string = "EXPIRED" )
Variables ¶
View Source
var ( TokipayPaymentQr = utils.API{ Url: "/v4/spose/payment/request", Method: http.MethodPost, } TokipayPaymentSentUser = utils.API{ Url: "/v4/spose/payment/user-request", Method: http.MethodPost, } TokipayPaymentScanUser = utils.API{ Url: "/v4/spose/payment/scan/user-request", Method: http.MethodPost, } TokipayPaymentStatus = utils.API{ Url: "/v4/spose/payment/status?requestId=", Method: http.MethodGet, } TokipayPaymentCancel = utils.API{ Url: "/v4/spose/payment/request?requestId=", Method: http.MethodDelete, } TokipayRefund = utils.API{ Url: "/v4/spose/payment/refund", Method: http.MethodPut, } )
SocialPay
Functions ¶
This section is empty.
Types ¶
type Tokipay ¶
type Tokipay interface { PaymentQr(input TokipayPaymentQrInput) (TokipayPaymentResponse, error) PaymentSentUser(input TokipayPaymentQrInput) (TokipayPaymentResponse, error) PaymentScanUser(input TokipayPaymentQrInput) (TokipayPaymentResponse, error) PaymentStatus(requestId string) (TokipayPaymentStatusResponse, error) PaymentCancel(requestId string) (TokipayPaymentStatusResponse, error) }
type TokipayPaymentQrInput ¶
type TokipayPaymentQrRequest ¶
type TokipayPaymentQrRequest struct { SuccessUrl string `json:"successUrl"` FailureUrl string `json:"failureUrl"` OrderId string `json:"orderId"` MerchantId string `json:"merchantId"` Amount int64 `json:"amount"` Notes string `json:"notes"` Authorization string `json:"authorization"` }
Tokipay Payment Qr Request
type TokipayPaymentRequestResponse ¶ added in v1.2.34
type TokipayPaymentRequestResponse struct {
RequestId string `json:"requestId"`
}
type TokipayPaymentResponse ¶
type TokipayPaymentResponse struct { StatusCode int `json:"statusCode"` Error string `json:"error"` Message string `json:"message"` Data TokipayPaymentRequestResponse `json:"data"` Type string `json:"type"` }
Tokipay Payment Response
type TokipayPaymentScanUserRequest ¶
type TokipayPaymentScanUserRequest struct { SuccessUrl string `json:"successUrl"` FailureUrl string `json:"failureUrl"` OrderId string `json:"orderId"` MerchantId string `json:"merchantId"` Amount int64 `json:"amount"` Notes string `json:"notes"` Authorization string `json:"authorization"` RequestId string `json:"requestId"` }
Tokipay Payment Scan user request
type TokipayPaymentSentUserRequest ¶
type TokipayPaymentSentUserRequest struct { SuccessUrl string `json:"successUrl"` FailureUrl string `json:"failureUrl"` OrderId string `json:"orderId"` MerchantId string `json:"merchantId"` Amount int64 `json:"amount"` Notes string `json:"notes"` Authorization string `json:"authorization"` PhoneNo string `json:"phoneNo"` CountryCode string `json:"countryCode"` }
Tokipay Payment Sent user request
type TokipayPaymentStatusDataResponse ¶ added in v1.2.34
type TokipayPaymentStatusDataResponse struct {
Status string `json:"status"`
}
type TokipayPaymentStatusResponse ¶ added in v1.2.34
type TokipayPaymentStatusResponse struct { StatusCode int `json:"statusCode"` Error string `json:"error"` Message string `json:"message"` Data TokipayPaymentStatusDataResponse `json:"data"` Type string `json:"type"` }
type TokipayRefundInput ¶
type TokipayRefundRequest ¶
Click to show internal directories.
Click to hide internal directories.