Payment

Extends \NextEvent\PHPSDK\Model\Model

Payment model

Represents a payment authorization record issued by the API. Can be used to process payment and finally settle orders.

package

NextEvent\PHPSDK\Model

Methods

Supports getX or hasX Methods for properties which are yet unknown.

__call(string $name, array $args) : mixed
inherited

If the source of your model contains, e.g. a property named 'my_property', you can call getMyProperty() to retrieve it's value.

Arguments

$name

string

$args

array

Response

mixed

Model constructor

__construct(array $source) 
inherited

Parse source data.

Throws
\NextEvent\PHPSDK\Exception\InvalidModelDataException

Arguments

$source

array

The source data as received from the API

Get the value for the given variable.

get(string $var) : mixed
inherited

Should be used, if you expect the model to have custom properties which are not known/covered by the known getters

Arguments

$var

string

Response

mixed

Get the amount due to be payed

getAmount() : float

Response

float

Get the authorization code

getAuthorization() : string

Used for order settlement

Response

string

Get the currency of this payment

getCurrency() : string

Returns an alphanumeric currency code according to ISO 4217.

Response

string

Get the expiration date/time of this payment authorization

getExpires() : \NextEvent\PHPSDK\Model\DateTime

Get the numeric identifier of this payment

getId() : integer

Response

integer

Get the payment reference

getReference() : string

This value can be used on documents as it's a human readable identifier of a NextEvent payment transaction.

Response

string

Get the unique identifier of this payment

getUUID() : string

Used for order settlement

Response

string

Check if this payment authorization has expired

isExpired() : boolean

Response

boolean

Check model state if it is valid

isValid() : boolean
inherited abstract

Response

boolean

String representation of object

serialize() : string
inherited

Implements Serializable interface

Response

string

Convert model to an Array

toArray() : array
inherited

Response

array

Convert the model for logging

toLogContext() : array
inherited

Implements the LogContextInterface interface

Response

array

Represent the model as string

toString() : string
inherited

Response

string

Constructs the object from a string

unserialize( $serialized) 
inherited

Implements Serializable interface

Arguments

$serialized