PaymentMethodServiceDecorator
PaymentMethodServiceDecorator.php
:
42
Implements
PaymentMethodServiceInterface
Base class for `\Ibexa\Contracts\Payment\PaymentMethodServiceInterface` decorators.
The following example is a service overriding the PaymentServiceInterface::createPayment():
final class MyPaymentMethodServiceDecorator extends PaymentMethodServiceDecorator
{
public function createPaymentMethod(PaymentMethodCreateStruct $createStruct): PaymentMethodInterface
{
// Customize method behavior here
}
}
and relevant service definition:
services:
App\Payment\MyPaymentMethodServiceDecorator:
decorates: Ibexa\Contracts\Payment\PaymentMethodServiceInterface
Tags
Properties¶
$innerService¶
PaymentMethodServiceDecorator.php
:
44
|
|
Methods¶
__construct() ¶
PaymentMethodServiceDecorator.php
:
46
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$innerService | PaymentMethodServiceInterface | - | - |
createPaymentMethod() ¶
PaymentMethodServiceDecorator.php
:
70
Creates a new payment method.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$createStruct | PaymentMethodCreateStruct | - |
Struct with data needed to create a new payment method. |
Return values
deletePaymentMethod() ¶
PaymentMethodServiceDecorator.php
:
88
Deletes the payment method.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$paymentMethod | PaymentMethodInterface | - | - |
findPaymentMethods() ¶
PaymentMethodServiceDecorator.php
:
63
Returns payment methods matching the given query.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$query | PaymentMethodQuery|null | null |
Query used to fetch methods. |
$prioritizedLanguages | array<string|int, mixed>|null | null |
List of languages to use for fetching the payment methods. |
Return values
getPaymentMethod() ¶
PaymentMethodServiceDecorator.php
:
51
Returns payment method with given id.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$id | int | - | - |
$prioritizedLanguages | array<string|int, mixed>|null | null |
List of languages to use for fetching the payment method. |
Return values
getPaymentMethodByIdentifier() ¶
PaymentMethodServiceDecorator.php
:
56
Returns payment method with given identifier.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$identifier | string | - | - |
$prioritizedLanguages | array<string|int, mixed>|null | null |
List of languages to use for fetching the payment method. |
Return values
isPaymentMethodUsed() ¶
PaymentMethodServiceDecorator.php
:
82
Checks if the payment method is used in any payment.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$paymentMethod | PaymentMethodInterface | - | - |
Return values
bool
updatePaymentMethod() ¶
PaymentMethodServiceDecorator.php
:
75
Updates the payment method with given data.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$paymentMethod | PaymentMethodInterface | - | - |
$updateStruct | PaymentMethodUpdateStruct | - | - |