Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require(__DIR__ . '/httpful/bootstrap.php');
- use \Httpful\Request;
- $username = 'pfr3$tuser7';
- $password = 'hGcv%^*4534c8*-r45';
- $url = "http://partsfill.com/transactionUpdate.php";
- $xml_data ='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <notificationdata>
- <dealer>
- <availablePrice>204.0</availablePrice>
- <dealerId>CH07262</dealerId>
- <distance>1015</distance>
- <inventorySource>PV</inventorySource>
- <postalCode>53226</postalCode>
- <qoh>6</qoh>
- </dealer>
- <event>MESSAGE_SELLER_SHIPPED</event>
- <event_time>2015-01-27T16:59:35.900-06:00</event_time>
- <sellerInvoiceNumber>12323</sellerInvoiceNumber>
- <shipment>
- <carrier>4</carrier>
- <dimensionUOM>IN</dimensionUOM>
- <packages>
- <package>
- <additionalUpsFee>false</additionalUpsFee>
- <height>1.0</height>
- <length>3.0</length>
- <packageNumber>1</packageNumber>
- <shippingFee>13.96</shippingFee>
- <shippingLabel>
- ENCODED DATA REMOVED FOR EASE OF VIEWING
- </shippingLabel>
- <trackingId>1Z4125910392293250</trackingId>
- <weight>4.0</weight>
- <width>2.0</width>
- </package>
- </packages>
- <weightUOM>LBS</weightUOM>
- </shipment>
- <transactionId>PF4126311</transactionId>
- </notificationdata>';
- $response = Request::put($url)
- ->body($xml_data)
- ->authenticateWith($username , $password)
- ->addHeader('Content-Type', 'text/xml')
- ->send();
- echo $response;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement