payment-poc/providers/wspay/wspay.go

146 lines
4.8 KiB
Go
Raw Normal View History

2023-07-10 08:10:13 +00:00
package wspay
type CreateTransaction struct {
ShopID string `json:"ShopID"`
ShoppingCardID string `json:"ShoppingCartID"`
Version string `json:"Version"`
TotalAmount string `json:"TotalAmount"`
ReturnUrl string `json:"ReturnURL"`
ReturnErrorUrl string `json:"ReturnErrorURL"`
CancelUrl string `json:"CancelURL"`
Signature string `json:"Signature"`
}
2023-07-10 08:10:13 +00:00
type TransactionResponse struct {
TransactionId *string `json:"TransactionId"`
PaymentFormUrl *string `json:"PaymentFormUrl"`
2023-07-10 08:10:13 +00:00
}
2023-07-27 20:46:37 +00:00
type FormReturn struct {
2023-07-10 08:10:13 +00:00
CustomerFirstName string `form:"CustomerFirstname"`
CustomerSurname string `form:"CustomerSurname"`
CustomerAddress string `form:"CustomerAddress"`
CustomerCity string `form:"CustomerCity"`
CustomerZIP string `form:"CustomerZIP"`
CustomerCountry string `form:"CustomerCountry"`
CustomerPhone string `form:"CustomerPhone"`
CustomerEmail string `form:"CustomerEmail"`
ShoppingCartID string `form:"ShoppingCartID"`
Lang string `form:"Lang"`
DateTime string `form:"DateTime"` //yyyymmddHHMMss
Amount string `form:"Amount"` // eg. 123,43
ECI string `form:"ECI"`
STAN string `form:"STAN"`
Partner string `form:"Partner"`
WsPayOrderId string `form:"WsPayOrderId"`
PaymentType string `form:"PaymentType"`
CreditCardNumber string `form:"CreditCardNumber"` // masked number
PaymentPlan string `form:"PaymentPlan"`
ShopPostedPaymentPlan string `form:"ShopPostedPaymentPlan"`
ShopPostedLang string `form:"ShopPostedLang"`
ShopPostedCreditCardName string `form:"ShopPostedCreditCardName"`
Success int `form:"Success"`
ApprovalCode string `form:"ApprovalCode"`
ErrorMessage string `form:"ErrorMessage"`
ShopPostedPaymentMethod string `form:"ShopPostedPaymentMethod"`
Signature string `form:"Signature"`
}
2023-07-27 20:46:37 +00:00
type FormError struct {
2023-07-10 08:10:13 +00:00
CustomerFirstName string
CustomerSurname string
CustomerAddress string
CustomerCity string
CustomerZIP string
CustomerCountry string
CustomerPhone string
CustomerEmail string
ShoppingCartID string
Lang string
DateTime string //yyyymmddHHMMss
Amount string // eg. 123,43
ECI string
PaymentType string
PaymentPlan string
ShopPostedPaymentPlan string
ShopPostedLang string
ShopPostedCreditCardName string
Success int
ApprovalCode string
ErrorMessage string
ShopPostedPaymentMethod string
ErrorCodes string
Signature string
}
2023-07-27 20:46:37 +00:00
type FormCancel struct {
2023-07-10 08:10:13 +00:00
ResponseCode int
ShoppingCartID string
ApprovalCode string
Success int
Signature string
}
2023-07-27 20:46:37 +00:00
type CompletionRequest struct {
2023-07-10 08:10:13 +00:00
Version string
WsPayOrderId string
ShopId string
ApprovalCode string
STAN string
2023-07-27 10:09:38 +00:00
Amount int64
2023-07-10 08:10:13 +00:00
Signature string
}
2023-07-27 20:46:37 +00:00
type CompletionResponse struct {
2023-07-10 08:10:13 +00:00
WsPayOrderId string
ShopId string
ApprovalCode string
STAN string
ErrorMessage string
ActionSuccess string
Signature string
}
2023-07-27 20:46:37 +00:00
type StatusCheckRequest struct {
2023-07-10 08:10:13 +00:00
Version string
ShopId string
ShoppingCartId string
Signature string
}
2023-07-27 20:46:37 +00:00
type StatusCheckResponse struct {
2023-07-10 08:10:13 +00:00
WsPayOrderId string
Signature string
STAN string
ApprovalCode string
ShopID string
ShoppingCartID string
2023-07-31 07:21:54 +00:00
Amount int64
2023-07-10 08:10:13 +00:00
CurrencyCode string
ActionSuccess string
Success string // deprecated
2023-07-31 07:21:54 +00:00
Authorized string
Completed string
Voided string
Refunded string
2023-07-10 08:10:13 +00:00
PaymentPlan string
Partner string
OnSite int
CreditCardName string
CreditCardNumber string
ECI string
CustomerFirstName string
CustomerLastName string
CustomerCity string
CustomerZIP string
CustomerCountry string
CustomerPhone string
CustomerEmail string
2023-07-31 07:21:54 +00:00
TransactionDateTime string // yyyymmddHHMMss
2023-07-10 08:10:13 +00:00
IsLessThan30DaysFromTransaction bool
CanBeCompleted bool
CanBeVoided bool
CanBeRefunded bool
ExpirationDate string
}