\Heidelpay\PhpPaymentApiMethodInterface

Method Interface for Request/Response

Summary

Methods
Constants
toJson()
toArray()
fromJson()
fromPost()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

toJson()

toJson(integer  $options) : string

Returns a json representation of itself.

Parameters

integer $options

Returns

string

toArray()

toArray(boolean  $doSort) : array

Returns an array that represents the object instance.

Uses uppercase keys to be compatible with the heidelpay POST Payment API.

Parameters

boolean $doSort

sort the keys in alphabetical order

Returns

array

fromJson()

fromJson(string  $json) : \Heidelpay\PhpPaymentApi\AbstractMethod

Takes a JSON representation of an instance and returns a PHP object instance representation of it.

Parameters

string $json

Throws

\Heidelpay\PhpPaymentApi\Exceptions\JsonParserException

Returns

\Heidelpay\PhpPaymentApi\AbstractMethod

fromPost()

fromPost(array  $post) : \Heidelpay\PhpPaymentApi\AbstractMethod

Takes an array, e.g. a POST response and returns a PHP object instance representation of it.

Parameters

array $post

Returns

\Heidelpay\PhpPaymentApi\AbstractMethod