Deprecated: Defining the getGlobals() method in the "phpdocumentor" extension without explicitly implementing Twig\Extension\GlobalsInterface is deprecated since version 1.23. in D:\projects\php-payment-api\vendor\twig\twig\src\Environment.php on line 1499 Heidelpay Development : php-payment-api

Properties

Methods

toJson()

toJson(integer  $options) : string

Returns a json representation of itself.

Parameters

integer $options

Returns

string

toArray()

toArray(boolean  $doSort = false) : array

Returns an array that represents the object instance.

Uses uppercase keys to be compatible with the heidelpay POST Payment API.

Parameters

boolean $doSort

sort the keys in alphabetical order

Returns

array

buildSubParameterArray()

buildSubParameterArray(mixed  $requestParameter,   $parentParameterName) : array

Build an array for subParameterGroups like Company->location

Parameters

mixed $requestParameter

Is whether a parameter group, array or string

$parentParameterName

Returns

array

jsonSerialize()

jsonSerialize() 

fromJson()

fromJson(string  $json) : \Heidelpay\PhpPaymentApi\AbstractMethod

Takes a JSON representation of an instance and returns a PHP object instance representation of it.

Parameters

string $json

Returns

\Heidelpay\PhpPaymentApi\AbstractMethod

fromPost()

fromPost(array  $post) : \Heidelpay\PhpPaymentApi\AbstractMethod

Takes an array, e.g. a POST response and returns a PHP object instance representation of it.

Parameters

array $post

Returns

\Heidelpay\PhpPaymentApi\AbstractMethod

__construct()

__construct() 

Constructor will generate all necessary sub objects

authentification()

authentification(string  $securitySender = null, string  $userLogin = null, string  $userPassword = null, string  $transactionChannel = null, boolean  $sandboxRequest = false) : \Heidelpay\PhpPaymentApi\Request

Set all necessary authentication parameters for this request

Parameters

string $securitySender

security sender parameter, e.g. 31HA07BC8142C5A171745D00AD63D182

string $userLogin

user login parameter, e.g. 31ha07bc8142c5a171744e5aef11ffd3

string $userPassword

user password, e.g. 93167DE7

string $transactionChannel

channel id of the payment method, e.g. 31HA07BC8142C5A171744F3D6D155865

boolean $sandboxRequest

choose between sandbox and productive payment system

Returns

\Heidelpay\PhpPaymentApi\Request

async()

async(string  $languageCode = 'EN', string  $responseUrl = null) : \Heidelpay\PhpPaymentApi\Request

Set all necessary parameter for a asynchronous request

Parameters

string $languageCode

language code 2 letters for error messages and iframe, e.g. EN

string $responseUrl

response url of your application, e.g. https://www.url.com/response.php

Returns

\Heidelpay\PhpPaymentApi\Request

company()

company(string  $companyName = null, string  $poBox = null, string  $street = null, string  $zip = null, string  $city = null, string  $country = null, string  $CommercialSector = null, string  $registrationType = null, string  $commercialRegisterNumber = null, string  $vatId = null, array  $executives = null) 

Set all necessary parameter for company.

The executive array can be created beforehand or kept empty and be added later

Parameters

string $companyName
string $poBox
string $street
string $zip
string $city
string $country
string $CommercialSector
string $registrationType
string $commercialRegisterNumber
string $vatId
array $executives

customerAddress()

customerAddress(string  $nameGiven = null, string  $nameFamily = null, string  $nameCompany = null, string  $shopperId = null, string  $addressStreet = null, string  $addressState = null, string  $addressZip = null, string  $addressCity = null, string  $addressCountry = null, string  $contactMail = null) : \Heidelpay\PhpPaymentApi\Request

Set all necessary customer parameter for a request

Parameters

string $nameGiven

customer given name, e.g. John

string $nameFamily

customer family name, e.g. Doe

string $nameCompany

company name, e.g. heidelpay

string $shopperId

customer id in your application, e.g. 1249

string $addressStreet

address street of the customer, e.g. Vagerowstr.

string $addressState

address state ot the customer, e.g. Bayern

string $addressZip

address zip code, e.g. 69115

string $addressCity

address city, e.g. Heidelberg

string $addressCountry

address country code 2 letters, e.g. DE

string $contactMail

email address of the customer, e.g. ab@mail.de

Returns

\Heidelpay\PhpPaymentApi\Request

factoring()

factoring(string  $invoiceId, string  $shopperId = null) 

Parameters

string $invoiceId
string $shopperId

basketData()

basketData(string  $shopIdentifier = null, string  $amount = null, string  $currency = null, string  $secret = null) : \Heidelpay\PhpPaymentApi\Request

Set all basket or order information

Parameters

string $shopIdentifier

id of your application, e.g. order-125454

string $amount

amount of the current basket, e.g. 20.12

string $currency

currency code 3 letters, e.g. USD

string $secret

a secret to prevent your application against fake responses

Returns

\Heidelpay\PhpPaymentApi\Request

convertToArray()

convertToArray() : array

Convert request object to post key value format

Returns

array —

request

send()

send(string  $uri = null, array  $post = null, \Heidelpay\PhpPaymentApi\Adapter\HttpAdapterInterface|null  $adapter = null) : array

Send request to payment api

Parameters

string $uri

payment api url

array $post

heidelpay request parameter

\Heidelpay\PhpPaymentApi\Adapter\HttpAdapterInterface|null $adapter

Returns

array —

response|\Heidelpay\PhpPaymentApi\Response

b2cSecured()

b2cSecured(string  $salutation = null, string  $birthdate = null, string  $basketId = null) : \Heidelpay\PhpPaymentApi\Request

Parameter used in case of b2c secured invoice or direct debit

Parameters

string $salutation

customer salutation MR/MRS (Mandatory)

string $birthdate

customer birth date YYYY-MM-DD (Mandatory)

string $basketId

id of a given basket using heidelpay basket api (Optional)

Returns

\Heidelpay\PhpPaymentApi\Request

mapFromJson()

mapFromJson(string  $json) 

Maps a JSON string into single ParameterGroup instances.

Parameters

string $json

Throws

\Heidelpay\PhpPaymentApi\Exceptions\JsonParserException

mapFromJsonSubGroups()

mapFromJsonSubGroups(\Heidelpay\PhpPaymentApi\ParameterGroups\AbstractParameterGroup  $parameterGroup, string  $propertyName, mixed  $content) 

Maps sub parameter groups of JSON object

Parameters

\Heidelpay\PhpPaymentApi\ParameterGroups\AbstractParameterGroup $parameterGroup
string $propertyName
mixed $content

mapFromPost()

mapFromPost(array  $post) 

Maps a POST array into single ParameterGroup instances.

Parameters

array $post

mapSubGroupsFromPost()

mapSubGroupsFromPost(mixed  $parameterGroup, string  $paramGroupProp, string  $value, string  $parentGroup = '') 

Map response array attributes to sub parameter classes recursively

Parameters

mixed $parameterGroup
string $paramGroupProp
string $value
string $parentGroup