paymentApi

package
v0.0.0-...-c2f4907 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PaymentCreated   = "created"
	PaymentPending   = "pending"
	PaymentCommitted = "commited"
	PaymentProcessed = "processed"
	PaymentFailed    = "failed"
	PaymentCancelled = "cancelled"
)

Variables

This section is empty.

Functions

func CancelPayment

func CancelPayment(endpoint string, id string) error

func CommitPayment

func CommitPayment(endpoint string, id string) error

func CreatePayment

func CreatePayment(endpoint string, user string, value float64, timestamp string) (string, error)

Types

type Payment

type Payment struct {
	User   string  `json:"user"`
	Value  float64 `json:"value"`
	Error  string  `json:"error" redis:"-"`
	Status string  `json:"status" redis:"-"`
}

func FetchPayment

func FetchPayment(endpoint string, id string) (*Payment, error)

func (*Payment) String

func (p *Payment) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL