Example #1
0
File: ipn.php Project: yuantw/Shine
<?php

require 'includes/master.inc.php';
$pp = new PayPal();
if ($pp->process()) {
    $app = new Application();
    $app->select($_POST['item_number']);
    if (!$app->ok()) {
        error_log("Application {$_POST['item_name']} {$_POST['item_number']} not found!");
        exit;
    }
    $o = new Order();
    $o->load($_POST);
    $o->app_id = $app->id;
    $o->dt = dater();
    $o->type = 'PayPal';
    $o->insert();
    $o->generateLicense();
    $o->emailLicense();
}