Customize Error Messages in Advanced Integration
Learn how to customize error messages for Payment Pages with an external submit button using server-side and client-side error handling functions.
See Customize Error Messages for Payment Pages 2.0 section for more detailed information.
If you implement Payment Pages with the Submit button outside, some errors will be generated after the Payment Page is submitted. Zuora will forward these error messages based on your callback URL.
Use the Z.runAfterRender function to handle the server-side error messages:
Z.runAfterRender( serverErrorMessageCallback)
The function takes one input parameter which is the name of your custom function that handles the server-side error messages.
To customize error messages for Payment Pages with an external submit button:
- Define the error handling function.
- Use
Z.renderWithErrorHandlerto handle the client-side error messages. - Use
Z.runAfterRenderto handle the server-side error messages.