Shop Forums WordPress Plugins file_get_contents() Reply To: file_get_contents()

#1966

Diego

Hello Vinny!

UPS is working fine now, but USPS is giving me a headache. Here is the response to the request, it’s not a json encoded response, so I guess that’s the issue.

 

As you can see, at the end is the response from the UPS server, that works fine.

By the way, production settings have been enabled at USPS servers, I sent an email asking them to do so and they replied saying the configuration was working now.

 

Any ideas? Here is the response:

 

<?xml version=”1.0″?>
<RateV4Response>
<Package ID=”0″>
<ZipOrigination>
21152
</ZipOrigination>
<ZipDestination>
78257
</ZipDestination>
<Pounds>
0
</Pounds>
<Ounces>
0.6
</Ounces>
<FirstClassMailType>
PARCEL
</FirstClassMailType>
<Size>
REGULAR
</Size>
<Zone>
6
</Zone>
<Postage CLASSID=”0″>
<MailService>
First-Class Mail
</MailService>
<Rate>
1.95
</Rate>
<SpecialServices>
<SpecialService>
<ServiceID>
9
</ServiceID>
<ServiceName>
Certificate of Mailing
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
1.15
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
1
</ServiceID>
<ServiceName>
Insurance
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
1.85
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
false
</DueSenderRequired>
</SpecialService>
<SpecialService>
<ServiceID>
5
</ServiceID>
<ServiceName>
Registered Mail&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
10.95
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
false
</DueSenderRequired>
</SpecialService>
<SpecialService>
<ServiceID>
4
</ServiceID>
<ServiceName>
Registered without Insurance
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
10.95
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
0
</ServiceID>
<ServiceName>
Certified Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
2.95
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
13
</ServiceID>
<ServiceName>
Delivery Confirmation&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
true
</AvailableOnline>
<Price>
0.85
</Price>
<PriceOnline>
0.00
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
15
</ServiceID>
<ServiceName>
Signature Confirmation&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
true
</AvailableOnline>
<Price>
2.55
</Price>
<PriceOnline>
2.10
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
6
</ServiceID>
<ServiceName>
Collect on Delivery
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
5.90
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
true
</DueSenderRequired>
</SpecialService>
</SpecialServices>
</Postage>
</Package>
</RateV4Response>
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/homepages/16/d260502780/htdocs/comapeno/wp-content/plugins/eshop-shipping-extension/includes/modules/usps-module/USC_eShop_USPS.php</b> on line <b>683</b>
<br />
{“In-Store Pickup”:{“success”:true,”data”:{“In-Store Pickup”:{“price”:”0.00″,”details”:{“usc_pickup”:”This really only applies if you know us personally as we don’t really have a store front…”}}}},”US Postal Service”:{“msgs”:[“No shipping plans were found for your options!”]},”UPS”:{“data”:{“UPS – UPS Ground”:{“price”:”10.27″,”services”:{“Delivery Confirmation”:”2.00″}},”UPS – UPS Three-Day Select”:{“price”:”17.93″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”3″}},”UPS – UPS Second Day Air A.M.”:{“price”:”28.77″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”2″,”Scheduled Delivery Time”:”10:30 A.M.”}},”UPS – UPS Second Day Air”:{“price”:”25.08″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”2″}},”UPS – UPS Next Day Air Saver”:{“price”:”52.66″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”1″,”Scheduled Delivery Time”:”3:00 P.M.”}},”UPS – UPS Next Day Air”:{“price”:”57.09″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”1″,”Scheduled Delivery Time”:”10:30 A.M.”}}},”success”:true}}