Implementing paygol
Hi
I am looking at implementing paygol on my website (under construction).
paygol give you most of the code for the popup. I put this in gateway.php
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js"type="text/javascript"></script>
<!-- PayGol Form -->
<form name="pg_frm">
<input type="hidden" name="pg_serviceid" value="XXXX">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="Pay by SMS">
<input type="hidden" name="pg_custom" value="">
<input type="hidden" name="pg_price" value="1.5">
<input type="hidden" name="pg_return_url" value="">
<input type="hidden" name="pg_cancel_url" value="">
<input type="image" name="pg_button" class="paygol"src="http://www.paygol.com/micropayment/img/buttons/175/pay_en_4.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>
first thing is, what can I use as the return url. Normally there is a page to say the ad is paid for etc.
Second thing is they have given this example of code that can be used to update the database to put in paid status.
can anyone tell me how to do that.
<?php
// check that the request comes from PayGol server
if(!in_array($_SERVER['REMOTE_ADDR'],
array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
header("HTTP/1.0 403 Forbidden");
die("Error: Unknown IP");
}
// get the variables 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'];
$points = $_GET['points'];
$price = $_GET['price'];
$currency = $_GET['currency'];
// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database
?>
Thanks for your help.