54 lines
1.5 KiB
Go
54 lines
1.5 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Item struct {
|
|
Name string `json:"name"`
|
|
Quantity int `json:"quantity"`
|
|
Price float64 `json:"price"`
|
|
Description string `json:"description"`
|
|
Image string `json:"image"`
|
|
}
|
|
|
|
type Beneficiary struct {
|
|
AccountNumber string `json:"accountNumber"`
|
|
Bank string `json:"bank"`
|
|
Amount float64 `json:"amount"`
|
|
}
|
|
|
|
type CreateCheckoutSessionRequest struct {
|
|
CancelUrl string `json:"cancelUrl"`
|
|
Phone string `json:"phone"`
|
|
Email string `json:"email"`
|
|
Nonce string `json:"nonce"`
|
|
ErrorUrl string `json:"errorUrl"`
|
|
NotifyUrl string `json:"notifyUrl"`
|
|
SuccessUrl string `json:"successUrl"`
|
|
PaymentMethods []string `json:"paymentMethods"`
|
|
ExpireDate time.Time `json:"expireDate"`
|
|
Items []Item `json:"items"`
|
|
Beneficiaries []Beneficiary `json:"beneficiaries"`
|
|
Lang string `json:"lang"`
|
|
}
|
|
|
|
type ArifPayCheckoutResponse struct {
|
|
Error bool `json:"error"`
|
|
Msg string `json:"msg"`
|
|
Data struct {
|
|
SessionID string `json:"sessionId"`
|
|
PaymentURL string `json:"paymentUrl"`
|
|
CancelURL string `json:"cancelUrl"`
|
|
TotalAmount float64 `json:"totalAmount"`
|
|
} `json:"data"`
|
|
}
|
|
|
|
type ArifPayB2CRequest struct {
|
|
SessionID string `json:"Sessionid"`
|
|
PhoneNumber string `json:"Phonenumber"`
|
|
}
|
|
|
|
type ArifpayVerifyByTransactionIDRequest struct {
|
|
TransactionID string `json:"transactionId"`
|
|
PaymentType int `json:"paymentType"`
|
|
}
|