This section contains sample code for implementing Hosted Payment Method pages.
Zuora Global Support does not troubleshoot content from GitHub. The sample code is as an example of code that has worked for previous implementations and was created by both Zuora and non-Zuora authors. You must customize the sample code for use with your system. Send any comments and feedback to email@example.com.
Sample Demo Project
The sample code attached in this section will produce a simple demo project of the Hosted Payment Method pages. The project dynamically generates the iFrame URL, embeds the 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 four input values in each of the projects to make it display your Hosted Payment Method pages:
- ID (Page)
- Tenant ID
- API Security Key
- Domain URL (the domain that iFrame is hosted, e.g. 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 Hosted Payment Method pages:
Below are the languages for which sample code for this demo project is available.
- Open the PHP demo project.
- Modify the
subscription.phpfile with the four input values listed above.
- Open the Java demo project.
- Modify the
subscription.jspfile with the four input values listed above.