interface PaymentServiceInterface

Interface to be called for DI for PaymentServiceInterface related services

Methods

string|false
charge(string $service, Payment $paymentSession)

Charges the payment server

create(array $paymentData)

Creates the payment

Form
createForm(string $name, Payment $payment)

Shortcut to call PaymentFormFactory to create Form

createFreeAmount(Payment $payment)

Creates the payment for a free amount

createDefinedAmount($user, string $text, int $amount, string $currency)

Creates the payment for a defined amount

array
defineFreeAmount($user)

Defines the data to use for a free amount Payment

error(Payment $payment)

An error has occured after the Payment (Sends email to site + flash)

mixed
getAll()

Gets all the Payment

Payment|null
getFromSession(string $kind)

Gets the Payment from session

mixed
getParameter(string $parameter)

Returns the value of parameter

register(Payment $payment)

Registers the Payment in DB + Session

array|null
setDataFromSession(string $kind)

Defines PaymentData from session

Details

at line 27
string|false charge(string $service, Payment $paymentSession)

Charges the payment server

Parameters

string $service
Payment $paymentSession

Return Value

string|false

at line 32
create(array $paymentData)

Creates the payment

Parameters

array $paymentData

at line 38
Form createForm(string $name, Payment $payment)

Shortcut to call PaymentFormFactory to create Form

Parameters

string $name
Payment $payment

Return Value

Form

at line 43
createFreeAmount(Payment $payment)

Creates the payment for a free amount

Parameters

Payment $payment

at line 48
createDefinedAmount($user, string $text, int $amount, string $currency)

Creates the payment for a defined amount

Parameters

$user
string $text
int $amount
string $currency

at line 54
array defineFreeAmount($user)

Defines the data to use for a free amount Payment

Parameters

$user

Return Value

array

at line 59
error(Payment $payment)

An error has occured after the Payment (Sends email to site + flash)

Parameters

Payment $payment

at line 65
mixed getAll()

Gets all the Payment

Return Value

mixed

at line 71
Payment|null getFromSession(string $kind)

Gets the Payment from session

Parameters

string $kind

Return Value

Payment|null

at line 78
mixed getParameter(string $parameter)

Returns the value of parameter

Parameters

string $parameter

Return Value

mixed

Exceptions

LogicException

at line 83
register(Payment $payment)

Registers the Payment in DB + Session

Parameters

Payment $payment

at line 89
array|null setDataFromSession(string $kind)

Defines PaymentData from session

Parameters

string $kind

Return Value

array|null