Results 1 to 2 of 2

Thread: Update database to mark ad as paid and expiry date

  1. #1
    Thread Starter
    Junior Member mijmu's Avatar
    Join Date
    Jul 2011
    Posts
    27
    Thanks
    0
    Thanked 2 Times in 2 Posts

    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

    ?>

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    38,941
    Thanks
    161
    Thanked 3,206 Times in 3,077 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Return expiry date in another format
    By hugo in forum ClassiPress General Discussion
    Replies: 4
    Last Post: April 10th, 2011, 10:27 AM
  2. Disable Expiry Date
    By schedule in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: January 21st, 2011, 10:48 AM
  3. Job Expiry date jobroller
    By geneci in forum Report JobRoller Bugs
    Replies: 8
    Last Post: November 9th, 2010, 02:36 AM
  4. Setting Ad Expiry by date.
    By strategicdm in forum Help Using ClassiPress
    Replies: 3
    Last Post: July 9th, 2010, 02:01 PM