Properties

$dryRun

$dryRun : boolean

Dry run

If set to true request will be generated but not send to payment api. This is use full for testing.

Type

boolean — dry run

$requestArray

$requestArray : array

Heidelpay request array

Type

array — request

$responseArray

$responseArray : array

Heidelpay response array

Type

array — response

$paymentCode

$paymentCode : string

Type

string — Payment Code for this payment method

$brand

$brand : string

Type

string — Brand Code for this payment method

Methods

authorizeOnRegistration()

authorizeOnRegistration(string  $paymentReferenceId) : $this

Payment type authorisation on registration This payment type will be used to make an authorisation on a given registration.

Parameters

string $paymentReferenceId

(unique id of the registration)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

getPaymentCode()

getPaymentCode() : string

Returns the payment code for the payment request.

Returns

string

getBrand()

getBrand() : string

Returns the brand for the payment method.

Returns

string

getClassName()

getClassName() : string

Return the name of the used class

Returns

string —

class name

getPaymentUrl()

getPaymentUrl() 

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

prepareRequest()

prepareRequest() 

This function prepares the request for heidelpay api

It will add the used payment method and the brand to the request. If dry run is set the request will only be convert to an array.

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

jsonSerialize()

jsonSerialize() : array

Returns an array for a json representation.

Returns

array

toJson()

toJson(  $options) 

Parameters

$options

getResponseArray()

getResponseArray() : array

Returns

array

initialize()

initialize() : $this

Initialize Payment Request

The initialize request is for payment methods like wallet and hire purchase. It initializes the request for the certain payment.

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

finalize()

finalize(string  $paymentReferenceId) : $this

Payment type finalize

This payment type will be used to inform heidelpay about goods ship out. Necessary for secured direct debit,secured invoice and Santander.

Parameters

string $paymentReferenceId

reference id (uniqe id of the debit or capture)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

refund()

refund(mixed  $paymentReferenceId) : $this

Payment type refund

This payment type will be used to give a charge amount or even parts of it back to the given account.

Parameters

mixed $paymentReferenceId

payment reference id (unique id of the debit or capture)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

reversal()

reversal(mixed  $paymentReferenceId) : $this

Payment type reversal

This payment type will be used to give an uncharged amount or even parts of it back to the given account. This can be used to lower an amount on an invoice for example.

Parameters

mixed $paymentReferenceId

payment reference id (unique id of the authorisation)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this