Overview
This section contains sample code for implementing Z-Payments Page.
Please list any comments/questions regarding the available sample code in the 'Comments' section at the bottom of this page. Do not contact Zuora Support with questions regarding the sample code projects.
Sample Demo Project
The sample code attached in this section will produce a simple demo project of the Z-Payments Page. The project dynamically generates the iFrame URL (and signature), embeds an iFrame onto a webpage, and provides a link to refresh the iFrame and a link that displays the iFrame URL.
You will need to modify 4 inputs in each of the projects to make it display your Z-Payments Page:
1. ID (Page)
2. Tenant ID
3. API Security Key
4. Domain URL (the domain that iFrame is hosted, like apisandbox.zuora.com)
Each sample code project also contains a callback file that contains logic to do the callback validation. You will need to modify one input (API Security Key) on this file in order to make the demo project work.
If you properly modify the inputs above, then the demo project should display the following simple display of the Z-Payments Page:
Below are the languages for which sample code for this demo project is available.
PHP
Open the PHP demo project. Modify subscription.php file with the 4 inputs mentioned above.
Java
Open the Java demo project. Modify subscription.jsp file with the 4 inputs mentioned above.
Ruby
Open the Ruby demo project. Modify payment_controller.rb file with the 4 inputs mentioned above.


Comments