Error handling for Payment Pages 2.0
This document outlines the error handling mechanisms in Payment Pages 2.0, including gateway transaction errors, business validation errors, and system errors, along with examples and customization options.
This article describes how errors are handled in Payment Pages 2.0.
Payment Pages 2.0 Errors
Error handling in Payment Pages 2.0 is similar to the error handling in the Zuora application when creating a payment method. The following categories of errors can be returned on the Payment Pages 2.0.
-
Gateway Transaction Errors: Returned by the payment gateway, for example, billto_country is missing.
-
Business Validation Errors: Returned by Zuora, for example, the credit card expiration date has passed.
-
General System Errors: Returned by Zuora, such as when unable to connect to Zuora server. For example, if Payment Pages 2.0 or the Zuora server is down for maintenance, you will receive "HTTP 503 error".
-
Hosted Page Validation Errors: Returned by the Hosted Payment Page. See the next section for detail information.
Examples of business validation errors
-
ACH Bank ABA Code can not be null and must be digits string.
-
ACH Bank Account Number can not be null and must be digit.
-
ACH Bank Name is required.
-
Card Holder Name is required.
-
Credit Card Type is required.
-
Expiration date must be a future date.
-
Invalid Email
-
Invalid Month
-
Invalid Year, should be 4-digital year value.
-
Invalid Credit Card Number.
-
Once a payment method associated with an account it can not be associated with another account
-
Payment gateway is not active. It needs to be activated first.
-
State/Province should be ISO standard state or province. - is not an ISO state/province of United States.
-
The length of ACH Bank Account Name can not be longer than 70 characters.
-
The length of ACH Bank Account Number can not be longer than 30 characters.
-
You cannot create more than 100 payment methods for each customer account. If you need to create this payment method, please delete some others first.
-
security code should be numeric.
Unsuccessful Page Submission
If a Payment Pages 2.0 form submission fails, you can pre-load the new page with the previously entered information so that your user does not have to re-enter the information.
Set the
retainValues
parameter to "
true
" to restore previously entered information to the Payment Pages 2.0 form when the form has an error upon submission.
Sensitive information, including the credit card number and card security code (CVV), will not be saved and will always be cleared when the form is reloaded regardless of the
retainValues
setting.
Cookie Handling
For the inline style with the submit button outside, Payment Pages will keep user's values in cookie only if both of the following conditions satisfy:
-
The tenant-level permission, Disable HPM Cookies, is NOT enabled.
-
The
retainValuesparameter is set totrue.
In all other cases, the values users enter in Payment Page form will not be cached.
The following requirements must satisfy for the
retainValues
to correctly work:
-
This parameter is used only for the inline style Payment Pages 2.0 forms with the external submit button.
-
The
retainValuesshould be used only for the Payment Pages forms that are reloaded after an unsuccessful submission. The first loading of the Payment Page form should not include theretainValuesparameter.
Client-Side Credit Card Validation
When configuring a Payment Page 2.0, if you select Enable client-side validation , the input fields will be validated, and you can specify custom error messages for the validation errors. See Credit Card Validation for details.
Customize Error Messages
Error message customization is an optional step in implementing Payment Pages 2.0. For more information about how to customize error messages for Payment Pages 2.0, see Customize Error Messages for Payment Pages 2.0 .