Class VerifoneAuthorizeRequestResponseTransformer
- java.lang.Object
-
- com.broadleafcommerce.payment.service.gateway.requestresponse.AbstractVerifoneRequestResponseTransformer
-
- com.broadleafcommerce.payment.service.gateway.requestresponse.VerifoneAuthorizeRequestResponseTransformer
-
- All Implemented Interfaces:
VerifoneRequestResponseTransformer
- Direct Known Subclasses:
VerifoneAuthorizeAndCaptureRequestResponseTransformer
public class VerifoneAuthorizeRequestResponseTransformer extends AbstractVerifoneRequestResponseTransformer
The transformer forDefaultTransactionTypes.AUTHORIZEtransaction type.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Constructor Summary
Constructors Constructor Description VerifoneAuthorizeRequestResponseTransformer(VerifoneConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, VerifoneUtils verifoneUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddShippingInfo(@NonNull Map<String,Object> request, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)booleancanHandle(@NonNull String transactionType)Checks if this transformer can handle the specified transaction type.Map<String,Object>createVerifoneRequest(@NonNull VerifonePaymentRequest verifonePaymentRequest)Creates the Verifone request body based onVerifonePaymentRequest.protected IntegerformatPhoneNumber(String phoneNumber)protected StringgetEmail(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)protected StringgetReuseToken(@NonNull VerifonePaymentRequest verifonePaymentRequest, @NonNull Map<String,Object> verifoneResponse)protected VerifoneStoredCredentialsgetStoredCredentials(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory()protected VerifoneUtilsgetVerifoneUtils()com.broadleafcommerce.paymentgateway.domain.PaymentResponsepopulatePaymentResponse(@NonNull VerifonePaymentRequest verifonePaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull Map<String,Object> verifoneResponse)Populates the payment response based on the response from the Verifone API.protected voidpopulateRequestWithEncryptedCardOrReuseToken(@NonNull Map<String,Object> request, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)protected StoredCredentialsChargeRequestpopulateStoredCredentialChargeRequest(@NonNull StoredCredentialsChargeRequest storedCredentialsChargeRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)-
Methods inherited from class com.broadleafcommerce.payment.service.gateway.requestresponse.AbstractVerifoneRequestResponseTransformer
buildResponseMap, getAmountInMinorUnits, getConfigProperties, getObjectMapper, identifyDeclineType, identifyFailureType, isSuccess, putIfNotBlank
-
-
-
-
Constructor Detail
-
VerifoneAuthorizeRequestResponseTransformer
public VerifoneAuthorizeRequestResponseTransformer(VerifoneConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, VerifoneUtils verifoneUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Detail
-
canHandle
public boolean canHandle(@NonNull @NonNull String transactionType)Description copied from interface:VerifoneRequestResponseTransformerChecks 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
-
createVerifoneRequest
public Map<String,Object> createVerifoneRequest(@NonNull @NonNull VerifonePaymentRequest verifonePaymentRequest)
Description copied from interface:VerifoneRequestResponseTransformerCreates the Verifone request body based onVerifonePaymentRequest.- Specified by:
createVerifoneRequestin interfaceVerifoneRequestResponseTransformer- Overrides:
createVerifoneRequestin classAbstractVerifoneRequestResponseTransformer- Parameters:
verifonePaymentRequest- the verifone payment request- Returns:
- the Verifone request body
-
populatePaymentResponse
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(@NonNull @NonNull VerifonePaymentRequest verifonePaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull Map<String,Object> verifoneResponse)Description copied from interface:VerifoneRequestResponseTransformerPopulates the payment response based on the response from the Verifone API.- Specified by:
populatePaymentResponsein interfaceVerifoneRequestResponseTransformer- Overrides:
populatePaymentResponsein classAbstractVerifoneRequestResponseTransformer- Parameters:
verifonePaymentRequest- the verifone payment requestpaymentResponse- the payment response to populateverifoneResponse- the response from Verifone API- Returns:
- the populated payment response
-
getStoredCredentials
@Nullable protected VerifoneStoredCredentials getStoredCredentials(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
-
populateStoredCredentialChargeRequest
protected StoredCredentialsChargeRequest populateStoredCredentialChargeRequest(@NonNull @NonNull StoredCredentialsChargeRequest storedCredentialsChargeRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
-
populateRequestWithEncryptedCardOrReuseToken
protected void populateRequestWithEncryptedCardOrReuseToken(@NonNull @NonNull Map<String,Object> request, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
-
addShippingInfo
protected void addShippingInfo(@NonNull @NonNull Map<String,Object> request, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
-
getEmail
@Nullable protected String getEmail(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
-
getReuseToken
protected String getReuseToken(@NonNull @NonNull VerifonePaymentRequest verifonePaymentRequest, @NonNull @NonNull Map<String,Object> verifoneResponse)
-
getVerifoneUtils
protected VerifoneUtils getVerifoneUtils()
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
-