78 lines
2.2 KiB
Go
78 lines
2.2 KiB
Go
package dojo
|
|
|
|
type money struct {
|
|
Value int64 `json:"value"`
|
|
CurrencyCode string `json:"currencyCode"`
|
|
}
|
|
|
|
type createPaymentIntentRequest struct {
|
|
Amount money `json:"amount"`
|
|
Reference string `json:"reference"`
|
|
CaptureMode string `json:"captureMode"`
|
|
}
|
|
|
|
type createTerminalSessionRequest struct {
|
|
TerminalID string `json:"terminalId"`
|
|
Details terminalSessionDetails `json:"details"`
|
|
}
|
|
|
|
type terminalSessionDetails struct {
|
|
SessionType string `json:"sessionType"`
|
|
Sale terminalSessionSale `json:"sale"`
|
|
}
|
|
|
|
type terminalSessionSale struct {
|
|
PaymentIntentID string `json:"paymentIntentId"`
|
|
}
|
|
|
|
type terminalSessionResponse struct {
|
|
ID string `json:"id"`
|
|
Status string `json:"status"`
|
|
TerminalID string `json:"terminalId"`
|
|
PaymentDetails *paymentDetails `json:"paymentDetails"`
|
|
Receipt *receipt `json:"receipt,omitempty"`
|
|
}
|
|
|
|
type receipt struct {
|
|
Lines []receiptLine `json:"lines"`
|
|
}
|
|
|
|
type receiptLine struct {
|
|
LineType string `json:"lineType"`
|
|
Text *receiptText `json:"text,omitempty"`
|
|
}
|
|
|
|
type receiptText struct {
|
|
Align string `json:"align"`
|
|
EmphasisBold bool `json:"emphasisBold"`
|
|
Size string `json:"size"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
type paymentIntentResponse struct {
|
|
ID string `json:"id"`
|
|
Status string `json:"status"`
|
|
Reference string `json:"reference"`
|
|
Amount money `json:"amount"`
|
|
PaymentDetails *paymentDetails `json:"paymentDetails"`
|
|
}
|
|
|
|
type paymentDetails struct {
|
|
TransactionID string `json:"transactionId"`
|
|
TransactionDateTime string `json:"transactionDateTime"`
|
|
Message string `json:"message"`
|
|
AuthCode string `json:"authCode"`
|
|
Card dojoCard `json:"card"`
|
|
}
|
|
|
|
type dojoCard struct {
|
|
CardNumber string `json:"cardNumber"`
|
|
CardName string `json:"cardName"`
|
|
ExpiryDate string `json:"expiryDate"`
|
|
CardType string `json:"cardType"`
|
|
CardFundingType string `json:"cardFundingType"`
|
|
Last4PAN string `json:"last4PAN"`
|
|
EntryMode string `json:"entryMode"`
|
|
VerificationMethod string `json:"verificationMethod"`
|
|
}
|