\Heidelpay\PhpApi\PaymentMethodsDirectDebitB2CSecuredPaymentMethod

Direct debit secured for b2c payment Class

Direct debit secured for b2c payment method

Summary

Methods
Properties
Constants
getClassName()
setRequest()
getRequest()
getResponse()
setAdapter()
getAdapter()
getPaymentUrl()
prepareRequest()
jsonSerialize()
toJson()
registration()
authorize()
debit()
authorizeOnRegistration()
debitOnRegistration()
refund()
reversal()
capture()
rebill()
finalize()
$_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

registration()

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

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.

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

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

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

debitOnRegistration()

debitOnRegistration(string  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod|boolean

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

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod|boolean

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

capture()

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

Payment type capture

You can charge a given authorisation by capturing the transaction.

Parameters

string $PaymentReferenceId

( unique id of the authorisation )

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod

rebill()

rebill(string  $PaymentReferenceId) : \Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod|boolean

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 )

Returns

\Heidelpay\PhpApi\PaymentMethods\AbstractPaymentMethod|boolean

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