Update database to mark ad as paid and expiry date
Hi
I am looking to implement paygol on my website. I have the pay part working but now I need to update my database. This is where I am lost.
Paygol provide the attached code to be placed in a file. This is then called when the payment is successful.
Could someone tell me how to update the database or I can pay for someone to do it. Paygol say I can use these parameters to do the update. Custom might be used to pass maybe the post_id which can be used to update the ad as paid and the expiry date.
Thanks
Michael
<?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
?>