Copied!

PaymentServiceInterface

PaymentServiceInterface.php : 20

Service for managing payments.

Methods

publiccreatePayment()

PaymentServiceInterface.php : 54

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

Tags
Throws
BadStateException

If there is no valid initial workflow state for a payment.

Throws
UnauthorizedException

If the current user does not have access to the payment.

Throws
ValidationFailedExceptionInterface

If the payment creation struct is invalid.

publicdeletePayment()

PaymentServiceInterface.php : 70

Deletes an existing payment.

public deletePayment(PaymentInterface $payment) : void

Parameters

Name Type Default value Description
$payment PaymentInterface - -
Tags
Throws
UnauthorizedException

If the current user does not have access to the payment.

publicfindPayments()

PaymentServiceInterface.php : 43

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()

PaymentServiceInterface.php : 28

Returns payment with given id.

public getPayment(int $id) : PaymentInterface

Parameters

Name Type Default value Description
$id int - -

Return values

PaymentInterface

Tags
Throws
NotFoundException

If payment with given id does not exist.

Throws
UnauthorizedException

If the current user does not have access to the payment.

publicgetPaymentByIdentifier()

PaymentServiceInterface.php : 36

Returns payment with given identifier.

public getPaymentByIdentifier(string $identifier) : PaymentInterface

Parameters

Name Type Default value Description
$identifier string - -

Return values

PaymentInterface

Tags
Throws
NotFoundException

If payment with given identifier does not exist.

Throws
UnauthorizedException

If the current user does not have access to the payment.

publicupdatePayment()

PaymentServiceInterface.php : 63

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

Tags
Throws
BadStateException

If the payment is not in a state that allows updating.

Throws
UnauthorizedException

If the current user does not have access to the payment.

Throws
ValidationFailedExceptionInterface

If the payment update struct is invalid.