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

$_liveUrl

$_liveUrl : string

Payment Url of the live payment server

Please do not change the url.

Type

string — url for heidelpay api connection real or live system

$_sandboxUrl

$_sandboxUrl : string

Payment Url of the sandbox payment server

Please do not change the url.

Type

string — url for heidelpay api connection sandbox system

$_requestArray

$_requestArray : array

Heidelpay request array

Type

array — request

$_responseArray

$_responseArray : array

Heidelpay response array

Type

array — response

$_paymentCode

$_paymentCode : string

Payment code for this payment method

Type

string — payment code

$_brand

$_brand : string

Payment brand name for this payment method

Type

string — brand name

Methods

authorizeOnRegistration()

authorizeOnRegistration(string  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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)

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

getClassName()

getClassName() : string

Return the name of the used class

Returns

string —

class name

setRequest()

setRequest(\Heidelpay\PhpApi\Request  $Request) 

Set a new payment request object

Parameters

\Heidelpay\PhpApi\Request $Request

setAdapter()

setAdapter(mixed  $adapter) 

Set a HTTP Adapter for payment communication

Parameters

mixed $adapter

getAdapter()

getAdapter() : object

Get HTTP Adapter for payment communication

Returns

object

getPaymentUrl()

getPaymentUrl() : boolean|string

Get url of the used payment api

Throws

\Exception

mode not set

Returns

boolean|string —

url of the payment api

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.

jsonSerialize()

jsonSerialize() : array

Returns an array for a json representation.

Returns

array

toJson()

toJson(  $options) 

Parameters

$options

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.

Returns

$this

finalize()

finalize(mixed  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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

mixed $PaymentReferenceId

reference id ( uniqe id of the debit or capture)

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

refund()

refund(mixed  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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 ( uniqe id of the debit or capture)

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

reversal()

reversal(mixed  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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)

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod