2023-07-26 07:51:29 +00:00
|
|
|
package state
|
|
|
|
|
|
|
|
type PaymentState string
|
|
|
|
|
|
|
|
const (
|
2023-07-30 10:14:05 +00:00
|
|
|
// initial state
|
|
|
|
StatePreinitialized PaymentState = "preinitialized"
|
2023-07-26 07:51:29 +00:00
|
|
|
// initial state
|
|
|
|
StateInitialized PaymentState = "initialized"
|
|
|
|
|
2023-07-31 07:21:54 +00:00
|
|
|
// state given to async payments (eg. GooglePay,ApplePay...)
|
|
|
|
StatePending PaymentState = "pending"
|
|
|
|
|
2023-07-26 07:51:29 +00:00
|
|
|
// 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"
|
|
|
|
)
|
2023-07-27 20:46:37 +00:00
|
|
|
|
|
|
|
type PaymentGateway string
|
|
|
|
|
|
|
|
const (
|
|
|
|
GatewayWsPay PaymentGateway = "wspay"
|
|
|
|
GatewayStripe PaymentGateway = "stripe"
|
|
|
|
GatewayVivaWallet PaymentGateway = "viva-wallet"
|
2023-07-31 07:21:54 +00:00
|
|
|
GatewayMock PaymentGateway = "mock"
|
2023-07-27 20:46:37 +00:00
|
|
|
)
|