Ejemplo n.º 1
0
function charges_AfterInsert()
{
    //charges_AfterInsert @4-B46BA208
    //Custom Code @13-2A29BDB7
    if (CCGetSession("RecentItemNum")) {
        $ItemNum = CCGetSession("RecentItemNum");
    }
    startlistingnow($ItemNum, CCGetUserID());
}
Ejemplo n.º 2
0
                             $sum->query($query);
                             $failed = "Error: Account Credit Amount Invalid - Amount paid has been added to your account, but your listing has not been started";
                         }
                     }
                 } elseif ($lookdb->f("amt_due") < $payment_gross) {
                     $query = "insert into charges (`charge`, `user_id`, `cause`, `date`) values ('" . $payment_gross . "', '" . mysql_escape_string($buyer_id) . "', 'Payment made for Item Number {$ItemNum}', '" . time() . "')";
                     $sum->query($query);
                     $query = "insert into charges (`charge`, `user_id`, `cause`, `date`) values ('-" . $lookdb->f("amt_due") . "', '" . mysql_escape_string($buyer_id) . "', 'Payment used to start Item Number {$ItemNum}', '" . time() . "')";
                     $sum->query($query);
                     startlistingnow($ItemNum, $buyer_id);
                 } else {
                     $query = "insert into charges (`charge`, `user_id`, `cause`, `date`) values ('" . $payment_gross . "', '" . mysql_escape_string($buyer_id) . "', 'Payment made for Item Number {$ItemNum}', '" . time() . "')";
                     $sum->query($query);
                     $query = "insert into charges (`charge`, `user_id`, `cause`, `date`) values ('-" . $payment_gross . "', '" . mysql_escape_string($buyer_id) . "', 'Payment used to start Item Number {$ItemNum}', '" . time() . "')";
                     $sum->query($query);
                     startlistingnow($ItemNum, $buyer_id);
                 }
             } elseif ($lookdb->f("amt_due") > $payment_gross) {
                 $query = "insert into charges (`charge`, `user_id`, `cause`, `date`) values ('" . $payment_gross . "', '" . mysql_escape_string($buyer_id) . "', 'Payment for Item Number {$ItemNum}  :: Error - The Amount Paid Was Less Than The Amount Due - Amount paid has been added to your account, but your listing has not been started', '" . time() . "')";
                 $sum->query($query);
                 $failed = "Error: The Amount Paid Was Less Than The Amount Due - Amount paid has been added to your account, but your listing has not been started";
             }
         }
     }
 } elseif (ltrim(end(explode("-", $item_name))) == "Subscription") {
     subscribe($payer_id, $item_number, $payment_gross);
     if ($payer_id) {
         $lookdb->query("SELECT * FROM users WHERE user_id='" . $payer_id . "'");
         if ($lookdb->next_record()) {
             $ld = array("first" => $lookdb->f("first_name"), "last" => $lookdb->f("last_name"), "user_login" => $lookdb->f("user_login"), "email" => $lookdb->f("email"), "address" => $lookdb->f("address1"), "address2" => $lookdb->f("address2"), "state" => $lookdb->f("state_id"), "zip" => $lookdb->f("zip"), "city" => $lookdb->f("city"), "phonedy" => $lookdb->f("phone_day"), "phoneevn" => $lookdb->f("phone_evn"), "fax" => $lookdb->f("fax"), "ip" => $lookdb->f("ip_insert"), "date_created" => $lookdb->f("date_created"));
         }