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
-
See
-
PaymentMethodServiceInterface
Properties
Methods
Parameters
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
PaymentMethodInterface
Deletes the payment method.
Parameters
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
PaymentMethodListInterface
Returns payment method with given id.
|
|
public getPaymentMethod(int $id[, array<string|int, mixed>|null $prioritizedLanguages = null ]) : PaymentMethodInterface
|
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
PaymentMethodInterface
Returns payment method with given identifier.
|
|
public getPaymentMethodByIdentifier(string $identifier[, array<string|int, mixed>|null $prioritizedLanguages = null ]) : PaymentMethodInterface
|
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
PaymentMethodInterface
Checks if the payment method is used in any payment.
Parameters
Return values
bool
Updates the payment method with given data.
Parameters
Return values
PaymentMethodInterface