\Heidelpay\PhpApi\PaymentMethodsBasicPaymentMethodTrait

This classe is the basic payment method trait

It contains the main properties and functions for every payment method

Summary

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

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