PayGol Services makes it easy to stay connected with your customers, clients or mobile staff. We have a wide range of mobile communication solutions including Web SMS, Email to SMS, MMS and SMS API interfaces. Our SMS gateway is reliable, fast, cost effective and covers almost all operators in the world.
Learn more >>
|
||||||||||||||||||||||||
| Implementation | ||||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| Put this on your page once, it doesn't really matter where you put it: | ||||||||||||||||||||||||
|
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
|
||||||||||||||||||||||||
| Put this where you want the payment button: | ||||||||||||||||||||||||
|
<form name="pg_frm" method="post">
<input type="hidden" name="pg_serviceid" value="123"> <input type="hidden" name="pg_currency" value="EUR"> <input type="hidden" name="pg_price" value="1"> <input type="hidden" name="pg_name" value="DEMO"> <input type="hidden" name="pg_custom" value=""> <input type="hidden" name="pg_return_url" value="http://www.paygol.com/implementation"> <input type="hidden" name="pg_cancel_url" value=""> <input type="hidden" name="pg_notify_url" value=""> <input type="image" name="pg_button" class="paygol" src="http://www.paygol.com/micropayment/img/buttons/175/donate_en_3.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" onClick="pg_reDirect(this.form)"> </form> |
||||||||||||||||||||||||
| Parameters description | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| IPN | ||||||||||||||||||||||||
| What is IPN? | ||||||||||||||||||||||||
| Instant Payment Notification (IPN) is a message service that notifies you of events related to PayGol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other information related to a transaction. | ||||||||||||||||||||||||
| Information about the payment | ||||||||||||||||||||||||
| PayGol generates an IPN message when your customer clicks a button, such as a buy, download or donation button, and completes the transaction on PayGol. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on. | ||||||||||||||||||||||||
| How to receive the IPN information in my web page? | ||||||||||||||||||||||||
| PayGol provides samples of Instant Payment Notification (IPN) code for popular development environments. Use working sample code to speed up your PayGol integrations. This PHP sample code will just send you an e-mail everytime when a payment has been notified. Of course you can add your own funcionalities instead of just sending an email. |
||||||||||||||||||||||||
|
<?
// read the get from PayGol system $message_id = $_GET[message_id]; $shortcode = $_GET[shortcode]; $keyword = $_GET[keyword]; $message = $_GET[message]; $sender = $_GET[sender]; $operator = $_GET[operator]; $country = $_GET[country]; $custom = $_GET[custom]; $price = $_GET[price]; $currency = $_GET[currency]; $header = "From: you@domain.com"; $body = "message_id $message_id\n"; $body .= "shortcode $shortcode\n"; $body .= "keyword $keyword\n"; $body .= "message $message\n"; $body .= "sender $sender\n"; $body .= "operator $operator\n"; $body .= "country $country\n"; $body .= "custom $custom\n"; $body .= "price $price\n"; $body .= "currency $currency\n"; mail("you@domain.com", "PayGol IPN", $body, $header); ?> |
||||||||||||||||||||||||
| IPN Parameters description | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| © 2010 PayGol.com all rights reserved. | ||||||||||||||||||||||||