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.CAPTUREtransactions.executePayment(Map<String, Object> bodyParams, String currencyCode, String applicationId, String tenantId) Executes theDefaultTransactionTypes.AUTHORIZEtransactions.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.REFUNDtransactions.reverseAuthorize(Map<String, Object> bodyParams, String currencyCode, String applicationId, String tenantId) Executes theDefaultTransactionTypes.REVERSE_AUTHtransactions.
-
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.AUTHORIZEtransactions.- 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_AUTHtransactions.- 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.CAPTUREtransactions.- 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.REFUNDtransactions.- 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.
-