Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillResponse ¶
BillResponse is representing the response from the billing
func (*BillResponse) Status ¶
func (br *BillResponse) Status() Status
Status gets bill response status
type Gateway ¶
type Gateway interface { // GetCurrentBill returns the current bill of the provided customer. GetCurrentBill(customerID, transactionID string) (*BillResponse, error) // PayBill pays bill using the provided amount PayBill(customerID, transactionID string, Amount int) (*PaymentResponse, error) }
Gateway is a generic gateway to the remote billing system
type PaymentResponse ¶
PaymentResponse is representing the response of payment in the billing system.
func (*PaymentResponse) Status ¶
func (pr *PaymentResponse) Status() Status
Status gets payment response status
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is representing an implementation of the epay server
type Status ¶
type Status string
Status is representing the response status which is returned back to the epay processor
const ( // BillReturned indicates that bill is returned successfully BillReturned Status = "00" // NoCurrentBill indicates that subscriber doesn't have current bill NoCurrentBill Status = "62" // UnknownSubscriber indicates that subscriber ID was broken UnknownSubscriber Status = "14" // PaymentProcessed indicates that payment was processed successfully PaymentProcessed Status = "00" // PaymentAlreadyProcessed indicates that payment was already processed PaymentAlreadyProcessed Status = "94" // CommonError indicates an error which was occurred during payment CommonError Status = "96" )
Click to show internal directories.
Click to hide internal directories.