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