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

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

registration()

registration() : $this

Payment type registration

This payment type will be used to save account data inside the heidelpay system. You will get back a payment reference id. This gives you a way to charge this account later or even to make a recurring payment.

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

reregistration()

reregistration(  $referenceId) : \Heidelpay\PhpPaymentApi\TransactionTypes\ReregistrationTransactionType

This payment type is used to update account data inside the heidelpay system.

The passed reference id will identify the registration to update.

Parameters

$referenceId

Throws

\Exception

Returns

\Heidelpay\PhpPaymentApi\TransactionTypes\ReregistrationTransactionType

authorize()

authorize() : $this

Payment type authorisation

Depending on the payment method this type normally means that the amount of the given account will only be authorized. In case of payment methods like Sofort and Giropay (so called online payments) this type will be used just to get the redirect to their systems.

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

debit()

debit() : $this

Payment type debit

This payment type will charge the given account directly.

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

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

debitOnRegistration()

debitOnRegistration(string  $paymentReferenceId) : $this

Payment type debit on registration

This payment type will charge the given account directly. The debit is related to a registration.

Parameters

string $paymentReferenceId

( unique id of the registration

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

capture()

capture(string  $paymentReferenceId) : $this

Payment type capture

You can charge a given authorisation by capturing the transaction.

Parameters

string $paymentReferenceId

(unique id of the authorisation)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this

rebill()

rebill(string  $paymentReferenceId) : $this

Payment type rebill

This payment type will be used to charge a given transaction again. For example, in case of a higher shipping cost. Please make sure that you have the permission of your customer to charge again.

Parameters

string $paymentReferenceId

(unique id of the debit or capture)

Throws

\Heidelpay\PhpPaymentApi\Exceptions\UndefinedTransactionModeException

Returns

$this