Advertisement
kotvalera83

Update orders

Feb 3rd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.46 KB | None | 0 0
  1. <?php
  2. require(__DIR__ . '/httpful/bootstrap.php');
  3. use \Httpful\Request;
  4. $username = 'pfr3$tuser7';
  5. $password = 'hGcv%^*4534c8*-r45';
  6. $url = "http://partsfill.com/transactionUpdate.php";
  7. $xml_data ='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  8. <notificationdata>
  9.     <dealer>
  10.         <availablePrice>204.0</availablePrice>
  11.         <dealerId>CH07262</dealerId>
  12.         <distance>1015</distance>
  13.         <inventorySource>PV</inventorySource>
  14.         <postalCode>53226</postalCode>
  15.         <qoh>6</qoh>
  16.     </dealer>
  17.     <event>MESSAGE_SELLER_SHIPPED</event>
  18.     <event_time>2015-01-27T16:59:35.900-06:00</event_time>
  19.     <sellerInvoiceNumber>12323</sellerInvoiceNumber>
  20.     <shipment>
  21.         <carrier>4</carrier>
  22.         <dimensionUOM>IN</dimensionUOM>
  23.         <packages>
  24.             <package>
  25.                 <additionalUpsFee>false</additionalUpsFee>
  26.                 <height>1.0</height>
  27.                 <length>3.0</length>
  28.                 <packageNumber>1</packageNumber>
  29.                 <shippingFee>13.96</shippingFee>
  30.                 <shippingLabel>
  31.                                     ENCODED DATA REMOVED FOR EASE OF VIEWING
  32.                             </shippingLabel>
  33.                 <trackingId>1Z4125910392293250</trackingId>
  34.                 <weight>4.0</weight>
  35.                 <width>2.0</width>
  36.             </package>
  37.         </packages>
  38.         <weightUOM>LBS</weightUOM>
  39.     </shipment>
  40.     <transactionId>PF4126311</transactionId>
  41. </notificationdata>';
  42. $response = Request::put($url)
  43.     ->body($xml_data)
  44.     ->authenticateWith($username , $password)
  45.     ->addHeader('Content-Type', 'text/xml')
  46.     ->send();
  47. echo $response;
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement