97 lines
2.4 KiB
Go
97 lines
2.4 KiB
Go
package monetix
|
|
|
|
type General struct {
|
|
ProjectID int64 `json:"project_id"`
|
|
PaymentID string `json:"payment_id"`
|
|
Signature string `json:"signature,omitempty"`
|
|
}
|
|
|
|
type Customer struct {
|
|
ID string `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
Middle string `json:"middle_name,omitempty"`
|
|
LastName string `json:"last_name"`
|
|
IP string `json:"ip_address"`
|
|
|
|
Zip string `json:"zip,omitempty"`
|
|
Country string `json:"country,omitempty"`
|
|
State string `json:"state,omitempty"`
|
|
City string `json:"city,omitempty"`
|
|
Address string `json:"address,omitempty"`
|
|
}
|
|
|
|
type Payment struct {
|
|
Amount int64 `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
}
|
|
|
|
type Card struct {
|
|
PAN string `json:"pan"`
|
|
Year int `json:"year,omitempty"`
|
|
Month int `json:"month,omitempty"`
|
|
CardHolder string `json:"card_holder"`
|
|
}
|
|
|
|
type CardTokenize struct {
|
|
PAN string `json:"pan"`
|
|
Year int `json:"year,omitempty"`
|
|
Month int `json:"month,omitempty"`
|
|
CardHolder string `json:"card_holder"`
|
|
CVV string `json:"cvv,omitempty"`
|
|
}
|
|
|
|
type Token struct {
|
|
CardToken string `json:"card_token"`
|
|
CardHolder string `json:"card_holder,omitempty"`
|
|
MaskedPAN string `json:"masked_pan,omitempty"`
|
|
}
|
|
|
|
type CardPayoutRequest struct {
|
|
General General `json:"general"`
|
|
Customer Customer `json:"customer"`
|
|
Payment Payment `json:"payment"`
|
|
Card Card `json:"card"`
|
|
}
|
|
|
|
type CardTokenPayoutRequest struct {
|
|
General General `json:"general"`
|
|
Customer Customer `json:"customer"`
|
|
Payment Payment `json:"payment"`
|
|
Token Token `json:"token"`
|
|
}
|
|
|
|
type CardTokenizeRequest struct {
|
|
General General `json:"general"`
|
|
Customer Customer `json:"customer"`
|
|
Card CardTokenize `json:"card"`
|
|
}
|
|
|
|
type CardPayoutSendResult struct {
|
|
Accepted bool
|
|
ProviderRequestID string
|
|
StatusCode int
|
|
ErrorCode string
|
|
ErrorMessage string
|
|
}
|
|
|
|
type TokenizationResult struct {
|
|
CardPayoutSendResult
|
|
Token string
|
|
MaskedPAN string
|
|
ExpiryMonth string
|
|
ExpiryYear string
|
|
CardBrand string
|
|
}
|
|
|
|
type APIResponse struct {
|
|
RequestID string `json:"request_id"`
|
|
Message string `json:"message"`
|
|
Code string `json:"code"`
|
|
Operation struct {
|
|
RequestID string `json:"request_id"`
|
|
Status string `json:"status"`
|
|
Code string `json:"code"`
|
|
Message string `json:"message"`
|
|
} `json:"operation"`
|
|
}
|