class PaymentTypeEventContainer

Class PaymentTypeEventContainer is injected as alligator.payment.event.container. This container is connecting manager to other services

Constants

AVAILABLE_PAYMENT_TYPES_CACHED

Available payment types cache key

Methods

__construct(ContainerInterface $container)

No description

mixed
setPaymentTypesToCache(array $paymentTypes, null $checkoutSettingsId = null)

If $checkoutSettingsId is provided, only active will be cached (with different key)

array
getPaymentTypesFromCache()

Get payment types from cache

mixed
getCardPaymentTypes()

Get card payment types

mixed
applyTransition(mixed $step, null $order = null)

Applay state transition to provided step optional order passed

setFlashbagMessage(string $message)

Set flashbag message to session

mixed
getPaymentTypeByName(string $type)

Get payment type by name

mixed
getLastUnfinishedOrderForUser()

Get last unfinished order for logged user

mixed
getOrderDBById(int|string $id)

Get order from database by id

Order|mixed
editOrder(Order $order)

Edit order

string
generateUrlForRoute(string $route)

Generate url for route by route name

RedirectResponse
generateRedirectResponseForRoute(string $route, array $params = array())

Generate redirect response for route

mixed
getCashOneStepCheckout()

Get one step checkout from cache

sendEditedStateOrderMail(Order $order, string $type = 'edit', array $additionalMails = array(), null $cardOrderInfo = null)

Send order state changed mail

mixed
findAllPricelists()

Find all pricelists

mixed
getLoggedUser()

Get current user

Order|mixed
saveOrder(Order $order)

Persist order to database

recalculateItemsInOrder(Order $order)

Recalculate order items and persist changes

string
getFormattedAmount(double $total)

Format ammount using settings for decimals and separator

array
getCurrentCheckoutSettings()

Get current checkout settings

int|null
getCurrentCheckoutSettingsId()

Get current checkout settings id

Details

at line 40
__construct(ContainerInterface $container)

Parameters

ContainerInterface $container

at line 52
mixed setPaymentTypesToCache(array $paymentTypes, null $checkoutSettingsId = null)

If $checkoutSettingsId is provided, only active will be cached (with different key)

Parameters

array $paymentTypes
null $checkoutSettingsId

Return Value

mixed

at line 86
array getPaymentTypesFromCache()

Get payment types from cache

Return Value

array

at line 95
mixed getCardPaymentTypes()

Get card payment types

Return Value

mixed

at line 107
mixed applyTransition(mixed $step, null $order = null)

Applay state transition to provided step optional order passed

Parameters

mixed $step
null $order

Return Value

mixed

at line 116
setFlashbagMessage(string $message)

Set flashbag message to session

Parameters

string $message

at line 127
mixed getPaymentTypeByName(string $type)

Get payment type by name

Parameters

string $type

Return Value

mixed

at line 136
mixed getLastUnfinishedOrderForUser()

Get last unfinished order for logged user

Return Value

mixed

at line 147
mixed getOrderDBById(int|string $id)

Get order from database by id

Parameters

int|string $id

Return Value

mixed

at line 158
Order|mixed editOrder(Order $order)

Edit order

Parameters

Order $order

Return Value

Order|mixed

at line 169
string generateUrlForRoute(string $route)

Generate url for route by route name

Parameters

string $route

Return Value

string

at line 181
RedirectResponse generateRedirectResponseForRoute(string $route, array $params = array())

Generate redirect response for route

Parameters

string $route
array $params

Return Value

RedirectResponse

at line 190
mixed getCashOneStepCheckout()

Get one step checkout from cache

Return Value

mixed

at line 202
sendEditedStateOrderMail(Order $order, string $type = 'edit', array $additionalMails = array(), null $cardOrderInfo = null)

Send order state changed mail

Parameters

Order $order
string $type
array $additionalMails
null $cardOrderInfo

at line 216
mixed findAllPricelists()

Find all pricelists

Return Value

mixed

at line 225
mixed getLoggedUser()

Get current user

Return Value

mixed

at line 240
Order|mixed saveOrder(Order $order)

Persist order to database

Parameters

Order $order

Return Value

Order|mixed

at line 251
Order recalculateItemsInOrder(Order $order)

Recalculate order items and persist changes

Parameters

Order $order

Return Value

Order

at line 262
string getFormattedAmount(double $total)

Format ammount using settings for decimals and separator

Parameters

double $total

Return Value

string

at line 277
array getCurrentCheckoutSettings()

Get current checkout settings

Return Value

array

at line 286
int|null getCurrentCheckoutSettingsId()

Get current checkout settings id

Return Value

int|null