Package ru.loolzaaa.youkassa.processors
Class PaymentProcessor
java.lang.Object
ru.loolzaaa.youkassa.processors.PaymentProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCancel already createdPaymentby its identifier.CapturePaymentthat holds in waiting_for_capture status.Creates newPaymententity with certain parameters.findAll(PaymentList paymentList) Receive information about all payments with some filter conditions.Receive information about somePaymentby its identifier.
-
Constructor Details
-
PaymentProcessor
public PaymentProcessor()
-
-
Method Details
-
findById
Receive information about somePaymentby its identifier.- Parameters:
paymentId- payment identifier- Returns:
- payment entity with actual status
- Throws:
IllegalArgumentException- if payment id is null or empty
-
findAll
Receive information about all payments with some filter conditions.- Parameters:
paymentList- collection with filter conditions- Returns:
- listed payment entities
- See Also:
-
create
Creates newPaymententity with certain parameters.Generate random idempotency key if corresponding argument is null.
- Parameters:
paymentParams- parameters for new paymentidempotencyKey- idempotency key- Returns:
- new payment entity with actual status
- Throws:
IllegalArgumentException- if payment parameters is null
-
capture
CapturePaymentthat holds in waiting_for_capture status.Needs when payment was creates with capture = false (default) parameter.
Generate random idempotency key if corresponding argument is null.
- Parameters:
paymentId- payment identifier to be capturepaymentParams- capture parametersidempotencyKey- idempotency key- Returns:
- payment entity with actual status
- Throws:
IllegalArgumentException- if payment identifier is null or empty, and if capture parameters is null
-
cancel
Cancel already createdPaymentby its identifier.Generate random idempotency key if corresponding argument is null.
- Parameters:
paymentId- payment identifier to be canceledidempotencyKey- idempotency key- Returns:
- payment entity with actual status
- Throws:
IllegalArgumentException- if payment identifier is null or empty
-