Package de.adorsys.psd2.xs2a.service
Class PaymentService
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.PaymentService
-
@Service public class PaymentService extends Object
-
-
Constructor Summary
Constructors Constructor Description PaymentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseObject<CancelPaymentResponse>cancelPayment(de.adorsys.psd2.consent.api.pis.proto.PisPaymentCancellationRequest paymentCancellationRequest)Cancels payment by its ASPSP identifier and payment typeResponseObject<PaymentInitiationResponse>createPayment(byte[] payment, PaymentInitiationParameters paymentInitiationParameters)Initiates a payment though "payment service" corresponding service methodResponseObject<CommonPayment>getPaymentById(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType, String paymentProduct, String encryptedPaymentId)Retrieves payment from ASPSP by its ASPSP identifier, product and payment typeResponseObject<GetPaymentStatusResponse>getPaymentStatusById(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType, String paymentProduct, String encryptedPaymentId)Retrieves payment status from ASPSP
-
-
-
Method Detail
-
createPayment
public ResponseObject<PaymentInitiationResponse> createPayment(byte[] payment, PaymentInitiationParameters paymentInitiationParameters)
Initiates a payment though "payment service" corresponding service method- Parameters:
payment- Payment informationpaymentInitiationParameters- Parameters for payment initiation- Returns:
- Response containing information about created payment or corresponding error
-
getPaymentById
public ResponseObject<CommonPayment> getPaymentById(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType, String paymentProduct, String encryptedPaymentId)
Retrieves payment from ASPSP by its ASPSP identifier, product and payment type- Parameters:
paymentType- type of payment (payments, bulk-payments, periodic-payments)paymentProduct- payment product used for payment creation (e.g. sepa-credit-transfers, instant-sepa-credit-transfers...)encryptedPaymentId- ASPSP identifier of the payment- Returns:
- Response containing information about payment or corresponding error
-
getPaymentStatusById
public ResponseObject<GetPaymentStatusResponse> getPaymentStatusById(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType, String paymentProduct, String encryptedPaymentId)
Retrieves payment status from ASPSP- Parameters:
paymentType- The addressed payment category Single, Periodic or BulkpaymentProduct- payment product used for payment creation (e.g. sepa-credit-transfers, instant-sepa-credit-transfers...)encryptedPaymentId- String representation of payment primary ASPSP identifier- Returns:
- Information about the status of a payment
-
cancelPayment
public ResponseObject<CancelPaymentResponse> cancelPayment(de.adorsys.psd2.consent.api.pis.proto.PisPaymentCancellationRequest paymentCancellationRequest)
Cancels payment by its ASPSP identifier and payment type- Parameters:
paymentCancellationRequest-PisPaymentCancellationRequest- Returns:
- Response containing information about cancelled payment or corresponding error
-
-