Example of an HTTP Order Notice (POST method)

The HTTP Order Notices is an option as another way you can have data sent after an order is made. It can be turned on in the Marketing -> Checkout Settings. You will need to enter the URL you would like order information posted to. Please Note: Test orders will not be posted via HTTP post.

Below is a list of order information that is included in the HTTP order notification.

Order Notice Information
Address 1 Address 2
City Company
Country Custom Fields
Date Email
First Name Last Name
IP Address Item (Product)
Order ID Order Item Total
Order Total Phone Number
Quantity Referrer
State Zip

Click Here to view the XML schema for the notices.

Example PHP script used to capture HTTP post data:

  $data = $GLOBALS['HTTP_RAW_POST_DATA'];
  $itemid = "";
	  if (ereg("order-item id=\"(.*)\", $data, $matches)) {
	    $itemid = $matches[0];
	}
  $fp =
fopen("/home/cxu/Dev/SharewareEmart/deploy/sites/1/htdocs/examples/result."
. $itemid . "xml", "w");
  fwrite($fp, $data);
  fclose($fp);

Below is an example of the XML you would receive:

<?xml version="1.0" encoding="utf-8" ?>
<order-notification>
    <order id="1227037271-23207-250782" is-test="true" is-gift="false">
        <event>
            <event-name>order</event-name>
            <event-date>2008-11-18T13:41:11-06:00</event-date>
        </event>
        <order-status>Test</order-status>
        <order-date>2008-11-18T13:41:11-06:00</order-date>
        <order-item id="1227037271-23207-250782">
            <product id="3639-91">
                <name>Joe's test</name>
            </product>
            <quantity>1</quantity>
            <tax>3.13</tax>
            <total>53.13</total>
            <reginfo />
            <profit>0</profit>
            <affiliate-commission />
            <coupon-code />
        </order-item>
        <customer id="1226354950-348-707099">
            <address>
                <first-name>Joe</first-name>
                <last-name>Goe</last-name>
                <company>DR</company>
                <address1>550 W. Van Buren</address1>
                <address2 />
                <city>Chicago</city>
                <region>IL</region>
                <postal-code>60607</postal-code>
                <country>US</country>
                <phone>312-3255555</phone>
                <email>cc@digitalriver.com</email>
                <language-chosen>EN</language-chosen>
            </address>
        </customer>
        <shipping-address>
            <first-name>Joe</first-name>
            <last-name>Goe</last-name>
            <company>DR</company>
            <address1>550 W. Van Buren</address1>
            <address2 />
            <city>Chicago</city>
            <region>IL</region>
            <postal-code>60607</postal-code>
            <country>US</country>
            <phone>312-3255555</phone>
            <email>cc@digitalriver.com</email>
            <language-chosen />
        </shipping-address>
        <referrer>QA Test Account</referrer>
        <custom-referrer />
        <link-location>Unknown</link-location>
        <name-on-card>Test Order</name-on-card>
        <ip>208.79.252.140</ip>
    </order>
</order-notification>

Return to Main Menu