Payalogue Usage Guide

Quick Navigation

Payalogues: easy service dialogs

Payalogues are the easiest way to integrate Zaypay into your website without the hassle of having to code yourself. This document explains the types of Payalogues available and what you can do with them.

Site Access

The Site Access Payalogue allows you to grant access after payment, and revoke access after a configurable time, without any knowledge about coding. The instructions for this type of Payalogue are specific and should be read from the Stats & Integration page of the specific Payalogue. The rest of this page is applicable to the types, but not to the Site Access Payalogue. Your webhost needs to support PHP if you want to use this.

Integrated

An integrated Payalogue is the most simple Payalogue available. All it does is provide for a dialog to perform a payment, that's it. This is ideal if the service you offer is already provided for on your site and you just want the custumer to pay.

Donation

The name says it all! A donation Payalogue allows you to put a premade donation button (or a custom button if you prefer) on your website, to let your visitors make a donation to you. Donations can be made anonymously, but you can also specify for a donator to give his or her name, e-mail address, phone number and/or give some additional comments.

Download

A download Payalogue provides for a secure way to sell all sorts of files. You can upload any file to Zaypay, as long as it's less than 20 Megabytes and complies with our terms of use. After your file is uploaded and you've made the appropriate links in your website, Zaypay will do the rest.

Integration into your website: a matter of 2 copy-n-pastes

If you've decided to give any of the three Payalogue types described above a try, you'll see that you can click a 'Stats & Implementation' link. Besides showing you great statistics when payments for that Payalogue are coming in, it'll also tell you what you need to put into your webpage to make that Payalogue work. Lets go over this with a quick example. Assume your website is as simple as this:

<html>

  <head>
    <title>My website</title>
  </head>

  <body>
    <h1>Welcome to my website!</h1>
  </body>

</html>

To integrate the Payalogue in your website, take the first line of the code and put it in between your <head></head> tags, like this:

<head>
  <title>My website</title>
  <script src="http://www.zaypay.com/pay/1.js" type="text/javascript"></script>
</head>

This line is the same for each Payalogue you want to integrate into your website, except for the number in the URL. In this example the number is 1, but in your case it has to be the number of your Payalogue. You do not need to worry about the numbers, if you just copy and paste from the Payalogue code sample view.

The second piece of code you need to paste is the actual link to the Payalogue, which needs to be put somewhere in the body of your website, like this:

<body>
  <h1>Welcome to my website!</h1>
  <a href="http://www.zaypay.com/pay/1" onclick="ZPayment(this); return false"><img src="http://www.zaypay.com/pay/1/img" border="0" /></a>        
</body>

That's it! Just reload your webpage and let the payments flow.

Custom link text or image

In the example explained above, you've cut-and-pasted the code from the Payalogue statistics page into your website. This resulted in a clickable button you have selected when you created the Payalogue. If you want to have a custom button or text, just replace the <img /> tag, like this:

<body>
  <h1>Welcome to my website!</h1>
  <a href="http://www.zaypay.com/pay/1" onclick="ZPayment(this); return false">Click me!</a>
</body>

Of course, instead of the text Click me!, you can place your own <img /> tag there to point to a picture on your website.

Passing custom parameters

More advanced users would like to pass custom parameters for each payment. This can be useful when the Payalogue links are dynamically created for users logged in to their site, for example. These parameters are stored for each payment, so they can be viewed by your Transactions viewer or caught by your report_url script. An example of passing the arguments name=Zaypay and state=cool looks as follows:

<body>
  <h1>Welcome to my website!</h1>
  <a href="http://www.zaypay.com/pay/1?name=Zaypay&state=cool" onclick="ZPayment(this); return false">Click me!</a>
</body>

This will work for both users who have Javascript enabled as for those who don't.

Payalogue background reporting

If you're a more advanced user of the Zaypay services, you might want to have full control over each payment status. The Report URL field allows you to specify a URL on which you receive status reports. This overwrites the Report URL from the price setting this Payalogue is attached to, so you'll only receive reports on the one specified in your Payalogue. If you're using custom parameters in your Payalogue like mentioned above, these will be sent along with the Report URL.

For more information about Report URL, see the Api Integration Guide.

Custom parameter security

The custom parameter example as described above is very simple, but also very open to abuse if you use it in the wrong way. For example, you don't want to pass an internal identifier like a tracking number, since it would be easy for anyone visiting your website to change the identifier into something else. Instead, convert your tracking number to a unique hash. Chances are when visitors try to change the hash, it points to something nonexistent. Ofcourse, this means you'll have to do a hash-to-tracking-number lookup each time you use it.

If you're a PHP developer, a good function to create a hash with is md5 or sha1.