Interface MyFatoorahProvider
- All Known Implementing Classes:
ExternalMyFatoorahProvider
public interface MyFatoorahProvider
The MyFatoorah provider that is used to execute the requests to the MyFatoorah API.
- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptionExecutes theDefaultTransactionTypes.CAPTURE
transactions.executePayment
(Map<String, Object> bodyParams, String currencyCode, String applicationId, String tenantId) Executes theDefaultTransactionTypes.AUTHORIZE
transactions.getPaymentStatus
(String id, String keyType, String currencyCode, String applicationId, String tenantId) Gathers the status of a MyFatoorah payment based upon the invoiceId or paymentIdgetRefundStatus
(String refundId, String currencyCode, String applicationId, String tenantId) Gathers the status of a MyFatoorah refund by idinitiatePayment
(MyFatoorahInitiatePaymentRequest initPaymentRequest, String applicationId, String tenantId) This method is responsible for making call to init-payment end-point of MyFatoorah.initiateSession
(String customerId, String currencyCode, String applicationId, String tenantId) This method is responsible for making call to init-session end-point of MyFatoorah.Executes theDefaultTransactionTypes.REFUND
transactions.reverseAuthorize
(Map<String, Object> bodyParams, String currencyCode, String applicationId, String tenantId) Executes theDefaultTransactionTypes.REVERSE_AUTH
transactions.
-
Method Details
-
initiateSession
InitSessionResponse initiateSession(@Nullable String customerId, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) This method is responsible for making call to init-session end-point of MyFatoorah.- Parameters:
customerId
- the customer IDcurrencyCode
- The currency code for this requestapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from MyFatoorah API.
- Throws:
ProviderApiException
- if the request failed
-
executePayment
MyFatoorahResponse executePayment(Map<String, Object> bodyParams, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Executes theDefaultTransactionTypes.AUTHORIZE
transactions.- Parameters:
bodyParams
- the request bodycurrencyCode
- the currency code for the transactionapplicationId
- the application idtenantId
- the tenant id- Returns:
- the MyFatoorah ExecutePayment API response
- Throws:
ProviderApiException
- if the request failed
-
getPaymentStatus
MyFatoorahResponse getPaymentStatus(String id, String keyType, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Gathers the status of a MyFatoorah payment based upon the invoiceId or paymentId- Parameters:
id
- paymentId or invoiceId to get payment status.keyType
- paymentId or invoiceIdapplicationId
- the application idtenantId
- the tenant id- Returns:
- the status of a MyFatoorah payment
-
reverseAuthorize
MyFatoorahResponse reverseAuthorize(Map<String, Object> bodyParams, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Executes theDefaultTransactionTypes.REVERSE_AUTH
transactions.- Parameters:
bodyParams
- the request bodycurrencyCode
- The currency code for this transactionapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from MyFatoorah API
- Throws:
ProviderApiException
- if the request failed
-
capture
MyFatoorahResponse capture(Map<String, Object> bodyParams, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Executes theDefaultTransactionTypes.CAPTURE
transactions.- Parameters:
bodyParams
- the request bodycurrencyCode
- The currency code for this transactionapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from MyFatoorah API
- Throws:
ProviderApiException
- if the request failed
-
refund
MyFatoorahResponse refund(Map<String, Object> bodyParams, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Executes theDefaultTransactionTypes.REFUND
transactions.- Parameters:
bodyParams
- the request bodycurrencyCode
- The currency code for this transactionapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from MyFatoorah API
- Throws:
ProviderApiException
- if the request failed
-
getRefundStatus
MyFatoorahResponse getRefundStatus(String refundId, @Nullable String currencyCode, @Nullable String applicationId, @Nullable String tenantId) Gathers the status of a MyFatoorah refund by id- Parameters:
refundId
- the id of the MyFatoorah refundcurrencyCode
- The currency code for this requestapplicationId
- the application idtenantId
- the tenant id- Returns:
- the status of a MyFatoorah refund
- Throws:
ProviderApiException
- if the request failed
-
initiatePayment
MyFatoorahInitiatePaymentResponse initiatePayment(MyFatoorahInitiatePaymentRequest initPaymentRequest, @Nullable String applicationId, @Nullable String tenantId) This method is responsible for making call to init-payment end-point of MyFatoorah.- Parameters:
initPaymentRequest
- init payment requestapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from MyFatoorah API.
-