class PaymentTypeManager implements BasicEntityManagerInterface

Class PaymentTypeManager is injected as alligator.payment.manager service. PaymentTypeManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait

Constants

ALLSECURE_RESPONSE_CODE_OK

All secure response code regex

ALLSECURE_VALUE

All secure value key

CARD_PAYMENT_TYPES

Card payment types array

CARD_PAYMENT_STATUS_RESERVED

Card payment status reserved

CARD_PAYMENT_STATUS_COMPLETED

Card payment status completed

CARD_PAYMENT_STATUS_REFUNDED

Card payment status refunded

CARD_PAYMENT_STATUS_RELEASED

Card payment status released

CARD_PAYMENT_STATUS_FAILED

Card payment status failed

Properties

protected PaymentTypeRepository $repository
protected PaymentTypeEventContainer $eventContainer

Methods

mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

No description

__construct(PaymentTypeRepository $repository, PaymentTermsRepository $paymentTermsRepository, PaymentTypeEventContainer $eventContainer)

No description

mixed
getPaymentTerms()

Get payment terms

mixed
savePaymentTerms(PaymentTerms $paymentTerms)

Save payment terms

array
findAllPaymentTypes()

Find all payment types

array
findAllPaymentTypesForEdit()

Find all payment types for edit

array
findAllPricelists()

Find all pricelists

mixed
findPaymentTypeById(int $id)

Find payment type by id

bool
changePaymentType(string $paymentTypeName)

Change payment type

save(PaymentType $entity)

Save payment type entity

edit(PaymentType $entity)

Edit payment type entity

bool
remove(PaymentType $entity)

Remove payment type entity from database

bool
removePaymentTypesFromArray(array $array)

Remove multiple payment types

mixed
setPaymentTypesToCache(string|int|null $checkoutSettingsId = null)

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

getPaymentTypeObjByPk(int|string $id)

Get payment type object by primary key

array
getPaymentTypeRoleSettingsArray()

Get payment types role settings array

mixed
getCardPaymentTypes()

Get card payment types

mixed
getPaymentTypeByName(string $name)

Get payment type by name

array
handleAllSecureResponse(int|string $id, string $path)

Handle all secure response

applyStep(string $step, Order $order = null)

Applay transition step optional order is passed

array
handleAllSecurePayment()

Handle all secure payment

array
performPaymentForOrder(mixed $data)

Perform payment for order

array
handleNestPayPayment()

Handle NestPay payment

array
handleNestPayResponse(array $data)

Handle NestPay response

Details

in JQGridManagerTrait at line 26
mixed searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

array $searchParams
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 40
mixed findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

int $page
int $offset
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 53
mixed getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

Parameters

array|null $searchParams
array|null $sortParams
array|null $additionalParams
JQGridWrapper|null $jqGridWrapper

Return Value

mixed

at line 88
__construct(PaymentTypeRepository $repository, PaymentTermsRepository $paymentTermsRepository, PaymentTypeEventContainer $eventContainer)

Parameters

PaymentTypeRepository $repository
PaymentTermsRepository $paymentTermsRepository
PaymentTypeEventContainer $eventContainer

at line 101
mixed getPaymentTerms()

Get payment terms

Return Value

mixed

Exceptions

NonUniqueResultException

at line 118
mixed savePaymentTerms(PaymentTerms $paymentTerms)

Save payment terms

Parameters

PaymentTerms $paymentTerms

Return Value

mixed

at line 128
array findAllPaymentTypes()

Find all payment types

Return Value

array

at line 137
array findAllPaymentTypesForEdit()

Find all payment types for edit

Return Value

array

at line 146
array findAllPricelists()

Find all pricelists

Return Value

array

at line 159
mixed findPaymentTypeById(int $id)

Find payment type by id

Parameters

int $id

Return Value

mixed

Exceptions

NonUniqueResultException

at line 173
bool changePaymentType(string $paymentTypeName)

Change payment type

Parameters

string $paymentTypeName

Return Value

bool

Exceptions

AlligatorNoDBOrderFound
Exception

at line 241
PaymentType save(PaymentType $entity)

Save payment type entity

Parameters

PaymentType $entity

Return Value

PaymentType

at line 288
PaymentType edit(PaymentType $entity)

Edit payment type entity

Parameters

PaymentType $entity

Return Value

PaymentType

Exceptions

Exception

at line 361
bool remove(PaymentType $entity)

Remove payment type entity from database

Parameters

PaymentType $entity

Return Value

bool

Exceptions

ORMException

at line 381
bool removePaymentTypesFromArray(array $array)

Remove multiple payment types

Parameters

array $array

Return Value

bool

at line 398
mixed setPaymentTypesToCache(string|int|null $checkoutSettingsId = null)

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

Parameters

string|int|null $checkoutSettingsId

Return Value

mixed

at line 413
PaymentType getPaymentTypeObjByPk(int|string $id)

Get payment type object by primary key

Parameters

int|string $id

Return Value

PaymentType

Exceptions

NonUniqueResultException

at line 423
array getPaymentTypeRoleSettingsArray()

Get payment types role settings array

Return Value

array

at line 432
mixed getCardPaymentTypes()

Get card payment types

Return Value

mixed

at line 445
mixed getPaymentTypeByName(string $name)

Get payment type by name

Parameters

string $name

Return Value

mixed

Exceptions

NoResultException

at line 459
array handleAllSecureResponse(int|string $id, string $path)

Handle all secure response

Parameters

int|string $id
string $path

Return Value

array

Exceptions

NoResultException

at line 509
applyStep(string $step, Order $order = null)

Applay transition step optional order is passed

Parameters

string $step
Order $order null $order

at line 518
array handleAllSecurePayment()

Handle all secure payment

Return Value

array

at line 539
array performPaymentForOrder(mixed $data)

Perform payment for order

Parameters

mixed $data

Return Value

array

at line 585
array handleNestPayPayment()

Handle NestPay payment

Return Value

array

Exceptions

AlligatorRedirectException

at line 620
array handleNestPayResponse(array $data)

Handle NestPay response

Parameters

array $data

Return Value

array

Exceptions

AlligatorRedirectException