notification

package
v0.0.0-...-b3f3fbb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2015 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Overview

Package notification provides the Notification type for notifications in the version:

2.x

Index

Constants

View Source
const (
	PaymentNotificationVersion = "2.0.0-alpha"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	Version              string
	PaymentId            payment.PaymentID
	Ident                string
	Amount               int64 `json:",string"`
	Subunits             int8  `json:",string"`
	DecimalAmount        string
	Currency             string
	Country              string            `json:",omitempty"`
	PaymentMethodId      int64             `json:",string,omitempty"`
	Locale               string            `json:",omitempty"`
	Balance              payment.Balance   `json:",omitempty"`
	Status               string            `json:",omitempty"`
	TransactionTimestamp int64             `json:",string,omitempty"`
	Metadata             map[string]string `json:",omitempty"`
	Timestamp            int64             `json:",string"`
	Nonce                string            `json:",omitempty"`
	Signature            string            `json:",omitempty"`
}

PaymentNotification represents a notification for connected systems about the state of a payment

func New

func New(encodedPaymentID payment.PaymentID, p *payment.Payment) (*Notification, error)

func (*Notification) HashFunc

func (n *Notification) HashFunc() func() hash.Hash

func (*Notification) Identification

func (n *Notification) Identification() string

func (*Notification) Message

func (n *Notification) Message() ([]byte, error)

func (*Notification) Reader

func (n *Notification) Reader() io.ReadCloser

func (*Notification) SetTransactions

func (n *Notification) SetTransactions(tl payment.PaymentTransactionList)

func (*Notification) Sign

func (n *Notification) Sign(timestamp time.Time, nonce string, secret []byte) error

Jump to

Keyboard shortcuts

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