\Heidelpay\PhpApi\PaymentMethodsPrepaymentPaymentMethod

Prepayment Payment Class

Summary

Methods
Properties
Constants
getClassName()
setRequest()
getRequest()
getResponse()
setAdapter()
getAdapter()
getPaymentUrl()
prepareRequest()
jsonSerialize()
toJson()
authorize()
reversal()
refund()
$_dryRun
No constants found
No protected methods found
$_liveUrl
$_sandboxUrl
$_adapter
$_request
$_requestArray
$_response
$_responseArray
$_paymentCode
$_brand
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

$_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

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

authorize()

authorize() : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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.

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

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