Home Integration Methods Paymate Express

Paymate Express

Paymate Express integrates Paymate buttons from your web page.
Note: Recurring transactions are NOT supported.
Choose separator
Choose separator which will separate our cookie and ref value. We will use || in this example. You have to configure Paymate plugin to use this separator. Go to Plugins -> Paymate -> Configure -> Custom Value Separator
Paymate Button
Every paymate button code must be updated from image link to from.
Original button looks like this:

<div align="center">
         <a onclick="self.name = 'parent';" target="_blank" href="https://www.paymate.com/PayMate/ExpressPayment?mid=testmerchant&amt=58&ref=refnum&return=http://URL_TO_PostAffiliatePro/yourscript.php"><img src="https://www.paymate.com/homepage/images/butt_PayNow.gif" border="0" alt="Pay with Paymate Express"></a>
         <br />Pay with Paymate Express

Now you must substitute it with code below and copy colored values there from code above:
<form action=https://www.paymate.com/PayMate/ExpressPayment method=get>
            <input name="mid" type="hidden" value="testmerchant"/>
            <input  name="return" type="hidden" value="http://URL_TO_PostAffiliatePro/yourscript.php"/>
            <input type="hidden" id="pap_ab45c37" name="ref" value='refnum'>
<input type="hidden" name="amt" value='58'>
            <input alt="" src="https://www.paymate.com/homepage/images/butt_PayNow.gif" type="image"/>
Integration code
Now add the following code into EVERY Paymate button form. Please make sure that the custom field you have in your button has id="pap_ab45c37".
This will ensure that referrer will be added to the custom field after the specified separator.
Integration with your processing script - part 1
Now the return callback is pointed to your script. This callback has to be forwarded also to PAP paymate.php script, which url is http://URL_TO_PostAffiliatePro/plugins/Paymate/paymate.php. In case, your paymate processing script is in PHP, you can use following code to accomplish that. You can place it at the beginning of your processing file.

Integration with your processing script - part 2
The custom parameter is in format refValue||PapValue. In order for 3rd party system to work correctly you need to parse refValue from the custom parameter. To do this add following code right after Paymate verification.