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_CAPTURE
transactions.Map<String,Object>
authorizeTransaction(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)
Executes theDefaultTransactionTypes.AUTHORIZE
transactions.Map<String,Object>
captureTransaction(@NonNull String transactionId, @NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)
Executes theDefaultTransactionTypes.CAPTURE
transactions.Map<String,Object>
createUpdateToken(@NonNull Map<String,Object> bodyParams, String applicationId, String tenantId)
Create/Update a token using the Verifone Tokenisation Service.void
deleteToken(@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.UriComponentsBuilder
getApiUrlBuilder()
protected ExternalVerifoneProviderProperties
getProperties()
protected VerifoneAuthProvider
getVerifoneAuthProvider()
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.REFUND
transactions.Map<String,Object>
reverseAuthorizeTransaction(@NonNull String transactionId, String applicationId, String tenantId)
Executes theDefaultTransactionTypes.REVERSE_AUTH
transactions.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.REFUND
transactions.-
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:VerifoneProvider
Executes theDefaultTransactionTypes.AUTHORIZE
transactions.- Specified by:
authorizeTransaction
in 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:VerifoneProvider
Executes theDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transactions.- Specified by:
authorizeAndCaptureTransaction
in 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:VerifoneProvider
Executes theDefaultTransactionTypes.REVERSE_AUTH
transactions.- Specified by:
reverseAuthorizeTransaction
in 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:VerifoneProvider
Executes theDefaultTransactionTypes.CAPTURE
transactions.- Specified by:
captureTransaction
in 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:VerifoneProvider
Executes theDefaultTransactionTypes.REFUND
transactions. The transaction status should beSETTLEMENT_COMPLETED
.- Specified by:
refundTransaction
in 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:VerifoneProvider
Executes theDefaultTransactionTypes.REFUND
transactions. The transaction status should beSETTLEMENT_REQUESTED
.- Specified by:
voidTransaction
in 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:VerifoneProvider
Create/Update a token using the Verifone Tokenisation Service.- Specified by:
createUpdateToken
in 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:VerifoneProvider
Updates a token using the Verifone Tokenisation Service.- Specified by:
updateToken
in 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:VerifoneProvider
Deletes a token using the Verifone Tokenisation Service.- Specified by:
deleteToken
in 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:VerifoneProvider
Initiate a wallet payment using Google Pay or Apple Pay.- Specified by:
initiateWalletPayment
in 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()
-
-