Class SavedPaymentMethodSetupResult
- All Implemented Interfaces:
Serializable
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionContains the additional information about the webhook event.Returns the error message if creating the saved payment method is failed.Returns the saved payment method id known by the payment gateway.Returns the payment gateway status.Whether the saved payment method is created successfully.The tenant id that the saved payment method belongs to.void
setAdditionalAttributes
(Map<String, String> additionalAttributes) Contains the additional information about the webhook event.void
setErrorMessage
(String errorMessage) Returns the error message if creating the saved payment method is failed.void
setGatewayReferenceId
(String gatewayReferenceId) Returns the saved payment method id known by the payment gateway.void
setPaymentGatewayStatus
(String paymentGatewayStatus) Returns the payment gateway status.void
setSuccessful
(Boolean successful) Whether the saved payment method is created successfully.void
setTenantId
(String tenantId) The tenant id that the saved payment method belongs to.
-
Constructor Details
-
SavedPaymentMethodSetupResult
public SavedPaymentMethodSetupResult()
-
-
Method Details
-
getSuccessful
Whether the saved payment method is created successfully.- Returns:
- true if the saved payment method is created successfully, false if failed, null if undetermined
-
getPaymentGatewayStatus
Returns the payment gateway status. It can be of any value and should be used mainly for debugging, analyzing any issues.- Returns:
- the payment gateway status
-
getGatewayReferenceId
Returns the saved payment method id known by the payment gateway.This is an ID that is used to fetch the saved payment method that should be updated by the webhook handler.
For example, to create the saved payment method for the ACH payments in Stripe, you have to create the SetupIntent object and after that create the saved payment method entity in the PaymentTransactionServices. It is possible that this payment method cannot be verified instantly by the customer's bank. In this case, Stripe will send the webhook event "setup_intent.succeeded" or "setup_intent.setup_failed" when it is confirmed by the customer. And to have an ability to update the correct payment method in PaymentTransactionServices we have to fetch it by this reference ID. For Stripe this value should be the SetupIntent ID.
- Returns:
- the saved payment method id known by the payment gateway
-
getErrorMessage
Returns the error message if creating the saved payment method is failed.- Returns:
- the error message if any
-
getTenantId
The tenant id that the saved payment method belongs to.- Returns:
- the tenant id that the saved payment method belongs to
-
getAdditionalAttributes
Contains the additional information about the webhook event.- Returns:
- the additional information about the webhook event
-
setSuccessful
Whether the saved payment method is created successfully.- Parameters:
successful
- whether the saved payment method is created successfully
-
setPaymentGatewayStatus
Returns the payment gateway status. It can be of any value and should be used mainly for debugging, analyzing any issues.- Parameters:
paymentGatewayStatus
- the payment gateway status
-
setGatewayReferenceId
Returns the saved payment method id known by the payment gateway.This is an ID that is used to fetch the saved payment method that should be updated by the webhook handler.
For example, to create the saved payment method for the ACH payments in Stripe, you have to create the SetupIntent object and after that create the saved payment method entity in the PaymentTransactionServices. It is possible that this payment method cannot be verified instantly by the customer's bank. In this case, Stripe will send the webhook event "setup_intent.succeeded" or "setup_intent.setup_failed" when it is confirmed by the customer. And to have an ability to update the correct payment method in PaymentTransactionServices we have to fetch it by this reference ID. For Stripe this value should be the SetupIntent ID.
- Parameters:
gatewayReferenceId
- the saved payment method id known by the payment gateway
-
setErrorMessage
Returns the error message if creating the saved payment method is failed.- Parameters:
errorMessage
- the error message if any
-
setTenantId
The tenant id that the saved payment method belongs to.- Parameters:
tenantId
- the tenant id that the saved payment method belongs to
-
setAdditionalAttributes
Contains the additional information about the webhook event.- Parameters:
additionalAttributes
- the additional information about the webhook event
-