package wspay import ( "github.com/google/uuid" "time" ) type PaymentState string const ( // initial state StateInitialized PaymentState = "initialized" // state on response StateAccepted PaymentState = "accepted" StateError PaymentState = "error" StateCanceledInitialization PaymentState = "canceled_initialization" // state after confirmation StateCompleted PaymentState = "completed" StateVoided PaymentState = "voided" StateCanceled PaymentState = "canceled" ) type WsPayDb struct { Id uuid.UUID `db:"id"` ShopID string `db:"shop_id"` ShoppingCartID string `db:"shopping_card_id"` TotalAmount int64 `db:"total_amount"` Lang string `db:"lang"` CustomerFirstName string `db:"customer_first_name"` CustomerLastName string `db:"customer_last_name"` CustomerAddress string `db:"customer_address"` CustomerCity string `db:"customer_city"` CustomerZIP string `db:"customer_zip"` CustomerCountry string `db:"customer_country"` CustomerPhone string `db:"customer_phone"` PaymentPlan string `db:"payment_plan"` CreditCardName string `db:"credit_card_name"` CreditCardNumber string `db:"credit_card_number"` PaymentMethod string `db:"payment_method"` CurrencyCode int `db:"currency_code"` DateTime time.Time `db:"date_time"` ECI string `db:"eci"` STAN string `db:"stan"` Success int `db:"success"` ApprovalCode string `db:"approval_code"` ErrorMessage string `db:"error_message"` ErrorCodes string `db:"error_codes"` State PaymentState `db:"payment_state"` }