コード例 #1
0
function foxyshop_consolibyte_inventory_process()
{
    //DECRYPT (required)
    //-----------------------------------------------------
    $FoxyData_decrypted = foxyshop_decrypt($_POST["FoxyInventory"]);
    $xml = simplexml_load_string($FoxyData_decrypted, NULL, LIBXML_NOCDATA);
    //For Each Item
    foreach ($xml->foxyinventory->item as $item) {
        //Set Variables
        $product_code = (string) $item->product_code;
        $quantity_on_hand = (int) $item->quantity_on_hand;
        //Update Inventory
        foxyshop_inventory_count_update($product_code, $quantity_on_hand, 0);
    }
    //All Done!
    die("foxyinventory");
}
コード例 #2
0
    die("foxy");
    //-----------------------------------------------------
    // SUBSCRIPTION DATAFEED
    //-----------------------------------------------------
} elseif (isset($_POST["FoxySubscriptionData"])) {
    if ($_POST['FoxySubscriptionData'] == "") {
        die('No Content Received From Subscription Datafeed');
    }
    //If you don't want to use any of the subscription datafeed reminder features, uncomment the next line
    //die("Not In Use");
    //Setup Defaults
    $failed_days_before_cancel = 7;
    $billing_reminder_frequency_in_days = 3;
    $update_payment_method_reminder_days_of_month = array(1, 15, 28);
    //Decrypt
    $FoxyData_decrypted = foxyshop_decrypt($_POST["FoxySubscriptionData"]);
    $xml = simplexml_load_string($FoxyData_decrypted, NULL, LIBXML_NOCDATA);
    //For Each Subscription
    foreach ($xml->subscriptions->subscription as $subscription) {
        //Get Variables
        $customer_id = (string) $subscription->customer_id;
        $customer_first_name = (string) $subscription->customer_first_name;
        $customer_last_name = (string) $subscription->customer_last_name;
        $customer_email = (string) $subscription->customer_email;
        $transaction_date = (string) $subscription->transaction_date;
        $sub_token_url = (string) $subscription->sub_token_url;
        $past_due_amount = (double) $subscription->past_due_amount;
        $end_date = (string) $subscription->end_date;
        //Get Product Code
        foreach ($subscription->transaction_details->transaction_detail as $transaction_detail) {
            $product_code = (string) $transaction_detail->product_code;