deattachPaymentToCheckout
Learn how to delete the customer credit payment source from checkout.
Last updated
Learn how to delete the customer credit payment source from checkout.
Last updated
Use this global method to delete the customer credit payment source from checkout.
In addition to deleting the source from the checkout, this method will delete the Digital River Transition Payment Object corresponding to the sourceId
and will update the values for amountRemainingToBeContributed
and amountContributed
in the cart
object.
This method accepts parameters in JSON string format. You need to pass the cartId
and the sourceId
with this method.
Parameter | Required/Optional | Description |
---|---|---|
You'll see the following parameters in the response.
Parameter | Description |
---|---|
Import the deattachPaymentToCheck
method into your custom component javascript file with digialriverv3
as the namespace as shown below.
Call the global method from a custom JavaScript file by passing the cartId
, amount
and () sourceId arguments
as shown below.
cartId
Required
The Salesforce ID for the cart
object.
sourceId
Required
The unique identifier of the source to be removed.
isSuccess
This global method returns a Boolean value where:
true
–indicates the source was successfully deleted.
false
–indicates an error occurred while deleting the source from checkout. The system returns an error message when an error occurs, and the Boolean value is false
.
errorMessage
If the system returns an error and the value for isSuccess
is false
, this parameter displays one of the following error messages:
Missing or invalid input parameters specified: One of the input parameters are missing or invalid.
DR API error: An error message that comes from the Digital River API.