\Heidelpay\PhpPaymentApi\PaymentMethodsPrepaymentPaymentMethod

Prepayment Payment Class

Summary

Methods
Properties
Constants
getPaymentCode()
getBrand()
getClassName()
setRequest()
getRequest()
getResponse()
setAdapter()
getAdapter()
getPaymentUrl()
prepareRequest()
jsonSerialize()
toJson()
getResponseArray()
authorize()
reversal()
refund()
$dryRun
No constants found
No protected methods found
$adapter
$request
$requestArray
$response
$responseArray
$paymentCode
N/A
No private methods found
No private properties found
N/A

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

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

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

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

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