Documentation ¶
Overview ¶
Package payment_method provides types to represent Payment Methods
Index ¶
- Constants
- Variables
- func InsertPaymentMethodMetadataTx(db *sql.Tx, pm *Method, createdBy string) error
- func InsertPaymentMethodStatusTx(db *sql.Tx, pm *Method) error
- func InsertPaymentMethodTx(db *sql.Tx, pm *Method) error
- func ParseMethodStatus(s string) (methodStatus, error)
- func PaymentMethodMetadataTx(db *sql.Tx, pm *Method) (map[string]string, error)
- type Method
- func PaymentMethodByIDDB(db *sql.DB, id int64) (*Method, error)
- func PaymentMethodByIDTx(db *sql.Tx, id int64) (*Method, error)
- func PaymentMethodByProjectIDProviderNameMethodKeyDB(db *sql.DB, project_id int64, provider string, method_key string) (*Method, error)
- func PaymentMethodByProjectIDProviderNameMethodKeyTx(tx *sql.Tx, project_id int64, provider string, method_key string) (*Method, error)
Constants ¶
View Source
const ( PaymentMethodStatusActive methodStatus = "active" PaymentMethodStatusInactive methodStatus = "inactive" PaymentMethodStatusDisabled methodStatus = "disabled" )
View Source
const MetadataModel metadataModel = 0
Variables ¶
View Source
var ( ErrPaymentMethodNotFound = errors.New("payment method not found") ErrPaymentMethodWithoutID = errors.New("payment method has no id") )
Functions ¶
func ParseMethodStatus ¶
returns a valid paymentMethodStatus or error
Types ¶
type Method ¶
type Method struct { ID int64 `json:",string"` ProjectID int64 `json:",string"` Provider provider.Provider MethodKey string Created time.Time CreatedBy string Status methodStatus StatusChanged time.Time StatusCreatedBy string Metadata map[string]string }
PaymentMethod represents a mode (method of payment)
It is associated with a Provider and can be configured on a per-project base.
Click to show internal directories.
Click to hide internal directories.