Class ExternalVerifoneProvider
- java.lang.Object
-
- com.broadleafcommerce.payment.service.gateway.privider.external.AbstractExternalProvider
-
- com.broadleafcommerce.payment.service.gateway.privider.external.ExternalVerifoneProvider
-
- All Implemented Interfaces:
VerifoneProvider
public class ExternalVerifoneProvider extends AbstractExternalProvider implements VerifoneProvider
The default implementation ofVerifoneProvider.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Field Summary
-
Fields inherited from class com.broadleafcommerce.payment.service.gateway.privider.external.AbstractExternalProvider
X_VFI_API_IDEMPOTENCYKEY
-
-
Constructor Summary
Constructors Constructor Description ExternalVerifoneProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalVerifoneProviderProperties properties, VerifoneAuthProvider verifoneAuthProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>authOrAuthAndCapture(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Map<String,Object>authorizeAndCaptureTransaction(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Executes theDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransactions.Map<String,Object>authorizeTransaction(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Executes theDefaultTransactionTypes.AUTHORIZEtransactions.Map<String,Object>captureTransaction(@NonNull String transactionId, @NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Executes theDefaultTransactionTypes.CAPTUREtransactions.Map<String,Object>createUpdateToken(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Create/Update a token using the Verifone Tokenisation Service.voiddeleteToken(@NonNull String id, String applicationId, String tenantId)Deletes a token using the Verifone Tokenisation Service.protected Map<String,Object>executeTransactionRequest(@NonNull String url, @NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)protected Map<String,Object>executeTransactionRequest(@NonNull String url, String applicationId, String tenantId)protected org.springframework.web.util.UriComponentsBuildergetApiUrlBuilder()protected ExternalVerifoneProviderPropertiesgetProperties()protected VerifoneAuthProvidergetVerifoneAuthProvider()Map<String,Object>initiateWalletPayment(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Initiate a wallet payment using Google Pay or Apple Pay.Map<String,Object>refundTransaction(@NonNull String transactionId, @NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Executes theDefaultTransactionTypes.REFUNDtransactions.Map<String,Object>reverseAuthorizeTransaction(@NonNull String transactionId, String applicationId, String tenantId)Executes theDefaultTransactionTypes.REVERSE_AUTHtransactions.Map<String,Object>updateToken(@NonNull String id, @NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)Updates a token using the Verifone Tokenisation Service.Map<String,Object>voidTransaction(@NonNull String transactionId, String applicationId, String tenantId)Executes theDefaultTransactionTypes.REFUNDtransactions.-
Methods inherited from class com.broadleafcommerce.payment.service.gateway.privider.external.AbstractExternalProvider
executeRequest, getObjectMapper, getWebClient, uriVars
-
-
-
-
Constructor Detail
-
ExternalVerifoneProvider
public ExternalVerifoneProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalVerifoneProviderProperties properties, VerifoneAuthProvider verifoneAuthProvider)
-
-
Method Detail
-
authorizeTransaction
public Map<String,Object> authorizeTransaction(@NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.AUTHORIZEtransactions.- Specified by:
authorizeTransactionin interfaceVerifoneProvider- Parameters:
bodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
authorizeAndCaptureTransaction
public Map<String,Object> authorizeAndCaptureTransaction(@NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransactions.- Specified by:
authorizeAndCaptureTransactionin interfaceVerifoneProvider- Parameters:
bodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
reverseAuthorizeTransaction
public Map<String,Object> reverseAuthorizeTransaction(@NonNull @NonNull String transactionId, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.REVERSE_AUTHtransactions.- Specified by:
reverseAuthorizeTransactionin interfaceVerifoneProvider- Parameters:
transactionId- the transaction id to reverseapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
captureTransaction
public Map<String,Object> captureTransaction(@NonNull @NonNull String transactionId, @NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.CAPTUREtransactions.- Specified by:
captureTransactionin interfaceVerifoneProvider- Parameters:
transactionId- the transaction id to capturebodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
refundTransaction
public Map<String,Object> refundTransaction(@NonNull @NonNull String transactionId, @NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.REFUNDtransactions. The transaction status should beSETTLEMENT_COMPLETED.- Specified by:
refundTransactionin interfaceVerifoneProvider- Parameters:
transactionId- the transaction id to reversebodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
voidTransaction
public Map<String,Object> voidTransaction(@NonNull @NonNull String transactionId, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderExecutes theDefaultTransactionTypes.REFUNDtransactions. The transaction status should beSETTLEMENT_REQUESTED.- Specified by:
voidTransactionin interfaceVerifoneProvider- Parameters:
transactionId- the transaction id to reverseapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
createUpdateToken
public Map<String,Object> createUpdateToken(@NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderCreate/Update a token using the Verifone Tokenisation Service.- Specified by:
createUpdateTokenin interfaceVerifoneProvider- Parameters:
bodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
updateToken
public Map<String,Object> updateToken(@NonNull @NonNull String id, @NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderUpdates a token using the Verifone Tokenisation Service.- Specified by:
updateTokenin interfaceVerifoneProvider- Parameters:
id- the reuse token to updatebodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
deleteToken
public void deleteToken(@NonNull @NonNull String id, @Nullable String applicationId, @Nullable String tenantId)Description copied from interface:VerifoneProviderDeletes a token using the Verifone Tokenisation Service.- Specified by:
deleteTokenin interfaceVerifoneProvider- Parameters:
id- the reuse token to deleteapplicationId- the application idtenantId- the tenant id
-
initiateWalletPayment
public Map<String,Object> initiateWalletPayment(@NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
Description copied from interface:VerifoneProviderInitiate a wallet payment using Google Pay or Apple Pay.- Specified by:
initiateWalletPaymentin interfaceVerifoneProvider- Parameters:
bodyParams- the request bodyapplicationId- the application idtenantId- the tenant id- Returns:
- the response from Verifone API
-
authOrAuthAndCapture
protected Map<String,Object> authOrAuthAndCapture(@NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
-
executeTransactionRequest
protected Map<String,Object> executeTransactionRequest(@NonNull @NonNull String url, @NonNull @NonNull Map<String,Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId)
-
executeTransactionRequest
protected Map<String,Object> executeTransactionRequest(@NonNull @NonNull String url, @Nullable String applicationId, @Nullable String tenantId)
-
getApiUrlBuilder
protected org.springframework.web.util.UriComponentsBuilder getApiUrlBuilder()
-
getProperties
protected ExternalVerifoneProviderProperties getProperties()
-
getVerifoneAuthProvider
protected VerifoneAuthProvider getVerifoneAuthProvider()
-
-