Interface RequestResponseTransformer
- All Known Implementing Classes:
AbstractRequestResponseTransformer
,MyFatoorahAuthorizeAndCaptureRequestResponseTransformer
,MyFatoorahAuthorizeRequestResponseTransformer
,MyFatoorahCaptureRequestResponseTransformer
,MyFatoorahRefundRequestResponseTransformer
,MyFatoorahReverseAuthorizeRequestResponseTransformer
public interface RequestResponseTransformer
The transformer is used to create the request body for the MyFatoorah requests and populate the
payment response.
- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this transformer can handle the specified transaction type.createMyFatoorahRequest
(MyFatoorahPaymentRequest myFatoorahPaymentRequest) Creates the MyFatoorah request body based onMyFatoorahPaymentRequest
.com.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(MyFatoorahPaymentRequest myFatoorahPaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, MyFatoorahResponse myFatoorahResponse) Populates the payment response based on the response from the MyFatoorah API.
-
Method Details
-
canHandle
Checks if this transformer can handle the specified transaction type.- Parameters:
transactionType
- the transaction type of the request- Returns:
- true if this transformer can be used for the specified request
-
createMyFatoorahRequest
Creates the MyFatoorah request body based onMyFatoorahPaymentRequest
.- Parameters:
myFatoorahPaymentRequest
- the myFatoorah payment request- Returns:
- the MyFatoorah request body
- Throws:
MyFatoorahRequestCreationException
- when a problem is encountered while creating a MyFatoorah API request based on the providedMyFatoorahPaymentRequest
-
populatePaymentResponse
com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(MyFatoorahPaymentRequest myFatoorahPaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, MyFatoorahResponse myFatoorahResponse) Populates the payment response based on the response from the MyFatoorah API.- Parameters:
myFatoorahPaymentRequest
- the myFatoorah payment requestpaymentResponse
- the payment response to populatemyFatoorahResponse
- the response from MyFatoorah API- Returns:
- the populated payment response
- Throws:
MyFatoorahResponseInterpretationException
- when a problem is encountered while converting a MyFatoorah API response into aPaymentResponse
-