Copied!

PaymentServiceDecorator

PaymentServiceDecorator.php : 42

Base class for PaymentServiceInterface decorators.

Example implementation:

final class MyPaymentServiceDecorator extends PaymentServiceDecorator
{
    public function createPayment(PaymentCreateStruct $createStruct): PaymentInterface
    {
        // Customize method behavior here
    }
}

and relevant service definition:

services:
  App\Payment\MyPaymentServiceDecorator:
      decorates: Ibexa\Contracts\Payment\PaymentServiceInterface

Properties

protected $innerService

PaymentServiceDecorator.php : 44
protected PaymentServiceInterface $innerService

Methods

public__construct()

PaymentServiceDecorator.php : 46
public __construct(PaymentServiceInterface $innerService)

Parameters

Name Type Default value Description
$innerService PaymentServiceInterface - -

publiccreatePayment()

PaymentServiceDecorator.php : 66

Creates a new payment.

public createPayment(PaymentCreateStruct $createStruct) : PaymentInterface

Parameters

Name Type Default value Description
$createStruct PaymentCreateStruct -

Struct with data needed to create a new payment.

Return values

PaymentInterface

publicdeletePayment()

PaymentServiceDecorator.php : 76

Deletes an existing payment.

public deletePayment(PaymentInterface $payment) : void

Parameters

Name Type Default value Description
$payment PaymentInterface - -

publicfindPayments()

PaymentServiceDecorator.php : 61

Returns payments matching the given query.

public findPayments([PaymentQuery|null $query = null ]) : PaymentListInterface

Parameters

Name Type Default value Description
$query PaymentQuery|null null

Query used to fetch payments.

Return values

PaymentListInterface

publicgetPayment()

PaymentServiceDecorator.php : 51

Returns payment with given id.

public getPayment(int $id) : PaymentInterface

Parameters

Name Type Default value Description
$id int - -

Return values

PaymentInterface

publicgetPaymentByIdentifier()

PaymentServiceDecorator.php : 56

Returns payment with given identifier.

public getPaymentByIdentifier(string $identifier) : PaymentInterface

Parameters

Name Type Default value Description
$identifier string - -

Return values

PaymentInterface

publicupdatePayment()

PaymentServiceDecorator.php : 71

Updates an existing payment with given data.

public updatePayment(PaymentInterface $payment, PaymentUpdateStruct $updateStruct) : PaymentInterface

Parameters

Name Type Default value Description
$payment PaymentInterface - -
$updateStruct PaymentUpdateStruct - -

Return values

PaymentInterface