Solved! Go to Solution.
โ12-24-2018 08:41 AM
Hi @venkat457,
What you are doing here is updating the CustomerPaymentProfile and later doing the Validation of the PaymentProfile, and you want to go back to the old PaymentProfile if the new PaymentProfile is invalid.
This is not possible, but you can first Validate the new details before updating the PaymentProfile, and if it is not valid you don't update.
This can be achieved by Updating the payment profile with <validationMode>liveMode</validationMode>
You need to set the ValidationMode to LiveMode and then update the CustomerPaymentProfile and if the cc details are invalid it will return with error and not update the PaymentProfile.
You can checkout the UpdateCustomerPaymentProfile sample for the setting.
Hope this Helps!
Kaushik
โ12-26-2018 03:51 AM
any suggestions please
โ12-24-2018 09:39 AM
Hello @venkat457
Have you considered adding a new payment profile, validating and if successful removing the previous payment profile?
Each customer profile can store up to 10 payment profiles.
Richard
โ12-24-2018 10:26 AM
I did consider that solution.
But i have customers with many credit cards and adding new ones yields to crossing the limit.
HEre's an eg:
I have a customer with 6 policies and he uses 6 cc for those 6 policies.
If he wants to update to 5 policies with new cc then i will be crossing the 10 limit.
Unless i am deleting one at a time...
Isnt there a better to validate card first before tieing to customer profile ??
โ12-24-2018 10:34 AM
Hi @venkat457,
What you are doing here is updating the CustomerPaymentProfile and later doing the Validation of the PaymentProfile, and you want to go back to the old PaymentProfile if the new PaymentProfile is invalid.
This is not possible, but you can first Validate the new details before updating the PaymentProfile, and if it is not valid you don't update.
This can be achieved by Updating the payment profile with <validationMode>liveMode</validationMode>
You need to set the ValidationMode to LiveMode and then update the CustomerPaymentProfile and if the cc details are invalid it will return with error and not update the PaymentProfile.
You can checkout the UpdateCustomerPaymentProfile sample for the setting.
Hope this Helps!
Kaushik
โ12-26-2018 03:51 AM
Thanks Kaushik.. this is perfect..
โ12-26-2018 06:25 AM