restructure hardlink layout
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/xml"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
ServiceName = "hardlink"
|
||||
DateOnly = "2006-01-02"
|
||||
CustomLayout = "2006-01-02 15:04:05 -0700"
|
||||
LinkStartTransaction = "http://127.0.0.1:18181/start-transaction/"
|
||||
LinkConfirmTransaction = "http://127.0.0.1:18181/confirm-transaction/"
|
||||
LinkTransactionInformation = "http://127.0.0.1:18181/transaction-information/"
|
||||
LinkChipDNAStatus = "http://127.0.0.1:18181/chipdna-status/"
|
||||
LinkVoidTransaction = "http://127.0.0.1:18181/void-transaction/"
|
||||
// Transaction types
|
||||
SaleTransactionType = "sale"
|
||||
AccountVerificationType = "account verification"
|
||||
|
||||
// Transaction results
|
||||
ResultApproved = "approved"
|
||||
ResultDeclined = "declined"
|
||||
ResultCancelled = "cancelled"
|
||||
ResultPending = "pending"
|
||||
ResultStateUncommitted = "uncommitted"
|
||||
ResultStateVoided = "voided"
|
||||
ResultError = "error"
|
||||
CheckinSuccessfulEndpoint = "/successful" // Endpoint to send guest to after successful payment
|
||||
CheckinUnsuccessfulEndpoint = "/unsuccessful"
|
||||
|
||||
// Response map keys
|
||||
CardReference = "CARD_REFERENCE"
|
||||
CardHash = "CARD_HASH"
|
||||
Errors = "ERRORS"
|
||||
ErrorDescription = "ERROR_DESCRIPTION"
|
||||
ReceiptData = "RECEIPT_DATA"
|
||||
ReceiptDataMerchant = "RECEIPT_DATA_MERCHANT"
|
||||
ReceiptDataCardholder = "RECEIPT_DATA_CARDHOLDER"
|
||||
Reference = "REFERENCE"
|
||||
CardType = "CARD_SCHEME_ID"
|
||||
PanMasked = "PAN_MASKED"
|
||||
ExpiryDate = "EXPIRY_DATE"
|
||||
TransactionResult = "TRANSACTION_RESULT"
|
||||
TransactionType = "TRANSACTION_TYPE"
|
||||
TransactionState = "TRANSACTION_STATE"
|
||||
ConfirmResult = "CONFIRM_RESULT"
|
||||
ConfirmErrors = "CONFIRM_ERRORS"
|
||||
TotalAmount = "TOTAL_AMOUNT"
|
||||
|
||||
// Log field keys
|
||||
LogFieldError = "error"
|
||||
LogFieldDescription = "description"
|
||||
LogResult = "transactionResult"
|
||||
)
|
||||
|
||||
type (
|
||||
TransactionReferenceRequest struct {
|
||||
XMLName xml.Name `xml:"TransactionReferenceRequest"`
|
||||
TransactionReference string `xml:"TransactionReference"`
|
||||
}
|
||||
|
||||
PreauthRec struct {
|
||||
Id int64
|
||||
TxnReference string
|
||||
TotalMinorUnits int64
|
||||
TotalAmount float64
|
||||
TxnDateTime time.Time
|
||||
DepartureDate time.Time // date-only (00:00)
|
||||
ReleaseDate time.Time
|
||||
Released bool
|
||||
ReleasedAt sql.NullTime
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user