Jump to content
Latest News: (loading..)
fulluvscents

USPS Rate V4, Intl Rate V2 (official support thread)

Recommended Posts

I have nearly the same problem and always have. A check for "S" charges for insurance but does NOT show the charge. It's all grouped in the First Class shipping charge.

Share this post


Link to post
Share on other sites
2 hours ago, Dennisra said:

I have nearly the same problem and always have. A check for "S" charges for insurance but does NOT show the charge. It's all grouped in the First Class shipping charge.

Mine does not show the insurance, nor is it added to the total. it's the same price as Priority Mail with or without insurance.

Installed Version: osCommerce Online Merchant v2.3.4

USPS Rate V4 Intl Rate V2_r1.8

Share this post


Link to post
Share on other sites

Change the Send Debug Email setting to true in this module and check the response in the email. Insurance should be showing as a separate charge.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Posted (edited)
Quote

Request:
API=RateV4&XML=<RateV4Request USERID="854RH2WA6494"><Revision>2</Revision><Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>08075</ZipOrigination><ZipDestination>08075</ZipDestination><Pounds>6</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="1"><Service>EXPRESS COMMERCIAL</Service><ZipOrigination>08075</ZipOrigination><ZipDestination>08075</ZipDestination><Pounds>6</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="0"><ZipOrigination>08075</ZipOrigination><ZipDestination>08075</ZipDestination><Pounds>6</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="1"><MailService>Priority Mail 1-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>10.40</Rate><CommercialRate>7.52</CommercialRate><SpecialServices><SpecialService><ServiceID>119</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.10</Price><PriceOnline>6.10</PriceOnline></SpecialService><SpecialService><ServiceID>120</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.35</Price><PriceOnline>6.35</PriceOnline></SpecialService><SpecialService><ServiceID>104</ServiceID><ServiceName>Certificate of Mailing (Form 3817)</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>1.40</Price><PriceOnline>1.40</PriceOnline></SpecialService><SpecialService><ServiceID>105</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>3.45</Price><PriceOnline>3.45</PriceOnline></SpecialService><SpecialService><ServiceID>170</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>171</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>172</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>103</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.50</Price><PriceOnline>7.50</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>175</ServiceID><ServiceName>Collect on Delivery Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>12.55</Price><PriceOnline>12.55</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>125</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>179</ServiceID><ServiceName>Insurance Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>109</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>11.90</Price><PriceOnline>11.90</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>176</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>16.95</Price><PriceOnline>16.95</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>107</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>4.20</Price><PriceOnline>4.20</PriceOnline></SpecialService><SpecialService><ServiceID>108</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>3.00</Price><PriceOnline>3.00</PriceOnline></SpecialService><SpecialService><ServiceID>173</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.05</Price><PriceOnline>8.05</PriceOnline></SpecialService><SpecialService><ServiceID>156</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.55</Price><PriceOnline>2.55</PriceOnline></SpecialService><SpecialService><ServiceID>174</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.60</Price><PriceOnline>7.60</PriceOnline></SpecialService><SpecialService><ServiceID>190</ServiceID><ServiceName>Special Handling - Fragile</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>10.45</Price><PriceOnline>10.45</PriceOnline></SpecialService><SpecialService><ServiceID>106</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>155</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService></SpecialServices></Postage></Package><Package ID="1"><ZipOrigination>08075</ZipOrigination><ZipDestination>08075</ZipDestination><Pounds>6</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="3"><MailService>Priority Mail Express 1-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>29.55</Rate><CommercialRate>26.22</CommercialRate><SpecialServices><SpecialService><ServiceID>119</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.10</Price><PriceOnline>6.10</PriceOnline></SpecialService><SpecialService><ServiceID>120</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.35</Price><PriceOnline>6.35</PriceOnline></SpecialService><SpecialService><ServiceID>103</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.50</Price><PriceOnline>7.50</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>175</ServiceID><ServiceName>Collect on Delivery Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>12.55</Price><PriceOnline>12.55</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>101</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>178</ServiceID><ServiceName>Insurance Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>118</ServiceID><ServiceName>Return Receipt</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.75</Price><PriceOnline>2.75</PriceOnline></SpecialService><SpecialService><ServiceID>190</ServiceID><ServiceName>Special Handling - Fragile</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>10.45</Price><PriceOnline>10.45</PriceOnline></SpecialService></SpecialServices></Postage></Package></RateV4Response>

Errors:
 

this is the email I received. no errors? $10.40 is the correct charge for a 6 pound shipment, Insurance should add $4.50

Edited by Gino D

Share this post


Link to post
Share on other sites

No errors found. Correct price and mailing products but not shown separately. It would be nice if the customer had the option of accepting insurance.

Request:
API=RateV4&XML=<RateV4Request USERID="********"><Revision>2</Revision><Package ID="0"><Service>First Class</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pounds><Ounces>4.96</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pounds><Ounces>4.96</Ounces><Container>FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="2"><Service>EXPRESS COMMERCIAL</Service><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pounds><Ounces>4.96</Ounces><Container>FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="0"><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pounds><Ounces>4.96</Ounces><FirstClassMailType>PACKAGE SERVICE RETAIL</FirstClassMailType><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage CLASSID="0"><MailService>First-Class Package Service - Retail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>3.75</Rate><SpecialServices><SpecialService><ServiceID>119</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>true</Available><Price>6.10</Price></SpecialService><SpecialService><ServiceID>120</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>true</Available><Price>6.35</Price></SpecialService><SpecialService><ServiceID>104</ServiceID><ServiceName>Certificate of Mailing (Form 3817)</ServiceName><Available>true</Available><Price>1.40</Price></SpecialService><SpecialService><ServiceID>105</ServiceID><ServiceName>Certified Ma
 il&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><Price>3.45</Price></SpecialService><SpecialService><ServiceID>170</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><Price>8.55</Price></SpecialService><SpecialService><ServiceID>171</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Required</ServiceName><Available>true</Available><Price>8.55</Price></SpecialService><SpecialService><ServiceID>172</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Restricted Delivery</ServiceName><Available>true</Available><Price>8.55</Price></SpecialService><SpecialService><ServiceID>103</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><Price>7.50</Price><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired
 >false</DueSenderRequired></SpecialService><SpecialService><ServiceID>175</ServiceID><ServiceName>Collect on Delivery Restricted Delivery</ServiceName><Available>true</Available><Price>12.55</Price><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>100</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><Price>2.10</Price><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>177</ServiceID><ServiceName>Insurance Restricted Delivery</ServiceName><Available>true</Available><Price>14.20</Price><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>109</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><Price>11.90</Price><DeclaredValu
 eRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>176</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><Price>16.95</Price><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>108</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><Price>3.00</Price></SpecialService><SpecialService><ServiceID>173</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><Price>8.05</Price></SpecialService><SpecialService><ServiceID>156</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Avai
 lable>true</Available><Price>2.55</Price></SpecialService><SpecialService><ServiceID>174</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic Restricted Delivery</ServiceName><Available>true</Available><Price>7.60</Price></SpecialService><SpecialService><ServiceID>190</ServiceID><ServiceName>Special Handling - Fragile</ServiceName><Available>true</Available><Price>10.45</Price></SpecialService><SpecialService><ServiceID>106</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><Price>0.00</Price></SpecialService><SpecialService><ServiceID>155</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Available>true</Available><Price>0.00</Price></SpecialService></SpecialServices></Postage></Package><Package ID="1"><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pound
 s><Ounces>4.96</Ounces><Container>FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="16"><MailService>Priority Mail 1-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>6.70</Rate><CommercialRate>6.55</CommercialRate><SpecialServices><SpecialService><ServiceID>119</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.10</Price><PriceOnline>6.10</PriceOnline></SpecialService><SpecialService><ServiceID>120</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.35</Price><PriceOnline>6.35</PriceOnline></SpecialService><SpecialService><ServiceID>104</ServiceID><ServiceName>Certificate of Mailing (Form 3817)</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>1.40</Price><PriceOnline>1.40</PriceOnline></Special
 Service><SpecialService><ServiceID>105</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>3.45</Price><PriceOnline>3.45</PriceOnline></SpecialService><SpecialService><ServiceID>170</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>171</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>172</ServiceID><ServiceName>Certified Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Adult Signature Restricted Del
 ivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.55</Price><PriceOnline>8.55</PriceOnline></SpecialService><SpecialService><ServiceID>103</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.50</Price><PriceOnline>7.50</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>175</ServiceID><ServiceName>Collect on Delivery Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>12.55</Price><PriceOnline>12.55</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>125</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnli
 ne><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>179</ServiceID><ServiceName>Insurance Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>109</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>11.90</Price><PriceOnline>11.90</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>176</ServiceID><ServiceName>Registered Mail&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableO
 nline>true</AvailableOnline><Price>16.95</Price><PriceOnline>16.95</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>107</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>4.20</Price><PriceOnline>4.20</PriceOnline></SpecialService><SpecialService><ServiceID>108</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>3.00</Price><PriceOnline>3.00</PriceOnline></SpecialService><SpecialService><ServiceID>173</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>8.05</Price><PriceOnline>8.05</PriceOnline></SpecialService><Spec
 ialService><ServiceID>156</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.55</Price><PriceOnline>2.55</PriceOnline></SpecialService><SpecialService><ServiceID>174</ServiceID><ServiceName>Signature Confirmation&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Electronic Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.60</Price><PriceOnline>7.60</PriceOnline></SpecialService><SpecialService><ServiceID>190</ServiceID><ServiceName>Special Handling - Fragile</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>10.45</Price><PriceOnline>10.45</PriceOnline></SpecialService><SpecialService><ServiceID>106</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;</ServiceName><Available>true</Available><AvailableOnline>true</A
 vailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>155</ServiceID><ServiceName>USPS Tracking&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Electronic</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService></SpecialServices></Postage></Package><Package ID="2"><ZipOrigination>*****</ZipOrigination><ZipDestination>*****</ZipDestination><Pounds>0</Pounds><Ounces>4.96</Ounces><Container>FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="13"><MailService>Priority Mail Express 1-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>24.70</Rate><CommercialRate>21.98</CommercialRate><SpecialServices><SpecialService><ServiceID>119</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.10</Price>
 <PriceOnline>6.10</PriceOnline></SpecialService><SpecialService><ServiceID>120</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>6.35</Price><PriceOnline>6.35</PriceOnline></SpecialService><SpecialService><ServiceID>103</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>7.50</Price><PriceOnline>7.50</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>175</ServiceID><ServiceName>Collect on Delivery Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>12.55</Price><PriceOnline>12.55</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>101</ServiceID><ServiceName>Ins
 urance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>178</ServiceID><ServiceName>Insurance Restricted Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>118</ServiceID><ServiceName>Return Receipt</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.75</Price><PriceOnline>2.75</PriceOnline></SpecialService><SpecialService><ServiceID>190</ServiceID><ServiceName>Special Handling - Fragile</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>10.45</Price><PriceOnline>10.45</PriceO
 nline></SpecialService></SpecialServices></Postage></Package></RateV4Response>

Errors:

 

 

Share this post


Link to post
Share on other sites

Did I miss some important information regarding USPS changes?

I ask since at 1112 local USPS was working at 1200 local it was not....

BJ

 

Share this post


Link to post
Share on other sites

The USPS changes for May took effect on the 18th, and were only the addition of a default value in any case. I doubt that's it.

I believe the latest USPS module is this one (the February 3rd. 2018 version). If that is not what you are using, you might try updating and see if that helps.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Jim - as you directed in your private message answer to me...

We have spoken before but it has been a looooong time.

Today (5-24) sometime between 1115 am and 1200 pm (noon) Pacific Daylight Time my USPS module simply stopped working.  Please see the attached backend image.

There is nothing in the logs - I am on Ubuntu latest version. 

I have reset the server thinking that perhaps the update could've caused it - No Joy.
I have thought I may have missed an update BUT no not according to the OSCommerce Contributions area 
 

My store is located here - https:/store.militarywives.com - if you wouldn't mind taking a look.

I have checked to see if any files had been unknowingly changed - that is not the case (either by me or others).

Any insight from you would be appreciated.

OSCommerce vsn is 
 v2.3.4

This is the header info from usps.php located in 
/includes/modules/shipping

USPS Rate V4 Intl Rate V2
  $Mod: Changed from Parcel Post to Standard Post 20130129 Kymation $
  $Mod: USPS API changes 20130729 Kymation v 1.3 $
  $Mod: USPS API changes 20140310 a.forever $  
  $Mod: USPS API changes 20140802 a.forever $
  $Mod: USPS API changes 20140823 Kymation v 1.4 $
  $Mod: USPS API changes 20140907 Kymation & a.forever v 1.5 $
  $Mod: USPS API changes 20160119 a.forever $Capture.JPG.ae90251d092238afa35c3a9faac88508.JPG

Share this post


Link to post
Share on other sites

That is an older version, and there are some critical changes since then. I suggest changing it out for the one I linked to in my previous post, and let us know if that works. If not I have some other ideas to try.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Just now, kymation said:

That is an older version, and there are some critical changes since then. I suggest changing it out for the one I linked to in my previous post, and let us know if that works. If not I have some other ideas to try.

Regards

Jim

Will do so when I am more awake - Have been going since 0400 so the brain (not to mention the eyes) are shot and I really do not want to make a stupid mistake because of being tired.  Will post if there is or is not a change after doing what you have suggested.

OH BTW THANK YOU!

BJ

Share this post


Link to post
Share on other sites

Jim

Before doing anything this morning I decided I should again verify the problem described above - the USPS shipping is now working.  I did nothing.  See the graphics below...

I will update to the version as discussed however I thought you would be interested in this morning's discovery.

Once again - no file was touched, modified, or otherwise changed from the time this started on 5-24 to the time that the verification was done at 0505 am local.

There are no signs of an outside intrusion and the only thing affected was the USPS shipping module.

I also included two other graphics (of the shipping estimator portion) of the Shopping Cart screen as an indication that it is pulling the data...

Although I WILL do the upgrade any ideas WHY it may have stopped and the restarted by itself?  This has me stymied.

Capture2.JPG

Capture4.JPG

Capture3.JPG

Share this post


Link to post
Share on other sites

It could have been something your host did, or a temporary routing problem on their Internet connection. Or it could have been some failure at the USPS server. There's no way to be certain at this point. Just keep an eye on it for a while in case it happens again.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Posted (edited)

I just updated our site to the CE Frozen version that Gary finalized a week or so ago.

Looking at:

https://apps.oscommerce.com/E3EVx&amp;usps-methods-rates-v4-intl-rates-v2-01

Before I dive in, does anybody have this module working on the latest CE version, compatible with php 7.2.*,  etc?

If so, what do I need to watch out for?

Thx

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

I have it working on a site running CE, but it's still on PHP5.6. It also has the Compatibility addon installed, so I don't know if you will run into issues with the defines.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

On my test server running php 7.2 I ran into this warning:

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxx\includes\classes\shipping.php on line 95

I changed:

for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

to

for ($i=0, $n=sizeof($quotes['methods']) <= 0 && is_array($quotes['methods']); $i<$n; $i++) {

Seems to work fine.


The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites
15 hours ago, Smoky Barnable said:

On my test server running php 7.2 I ran into this warning:

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxx\includes\classes\shipping.php on line 95

I changed:


for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

to


for ($i=0, $n=sizeof($quotes['methods']) <= 0 && is_array($quotes['methods']); $i<$n; $i++) {

Seems to work fine.

Confirmed on that error.

With error reporting on I see:

Warning: count(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/modules/shipping/usps.php on line 426

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/classes/shipping.php on line 95

For /includes/modules/shipping/usps.php on line 426
The line shows:

        $count_services = count( $response_array['Package'] );

Not sure what to do about that.

 

Then in classes/shipping.php...changing this:

            for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

to this:

            for ($i=0, $n=sizeof($quotes['methods']) <= 0 && is_array($quotes['methods']); $i<$n; $i++) {

However the errors persist.  Any ideas?

 


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites
Posted (edited)
17 hours ago, kymation said:

I have it working on a site running CE, but it's still on PHP5.6. It also has the Compatibility addon installed, so I don't know if you will run into issues with the defines.

Regards

Jim

@kymation

Other than the errors I just posted I had to change

      $this->icon = DIR_WS_ICONS . 'shipping_usps.gif'; 

to

      $this->icon = '/images/icons/shipping_usps.gif';

And upload the icon as it isn't in the CE package.

Also, I have

1st-Class Parcel
and 
1st-Class Package Service
checked but they do not show up as options.
Priority mail does show up

EDIT EDIT EDIT...

On a second test purchase...and just enabling 1st class package service...it now shows.  Hmmm. 

That's it for now.

Thx..SK

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites
8 minutes ago, altoid said:

Confirmed on that error.

With error reporting on I see:

Warning: count(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/modules/shipping/usps.php on line 426

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/classes/shipping.php on line 95

For /includes/modules/shipping/usps.php on line 426
The line shows:

        $count_services = count( $response_array['Package'] );

Not sure what to do about that.

 

Then in classes/shipping.php...changing this:

            for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

to this:

            for ($i=0, $n=sizeof($quotes['methods']) <= 0 && is_array($quotes['methods']); $i<$n; $i++) {

However the errors persist.  Any ideas?

 

           for ($i=0, is_array($quotes['methods']) && $n=sizeof($quotes['methods']) >= 0; $i<$n; $i++) {

test it's an array before sizing it

On your new error I guess you're getting an error response that's not handled properly. Try changing line 424 to

} elseif (is_array($response_array['Package'])) {

 


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
Posted (edited)
49 minutes ago, BrockleyJohn said:

           for ($i=0, is_array($quotes['methods']) && $n=sizeof($quotes['methods']) >= 0; $i<$n; $i++) {

test it's an array before sizing it

On your new error I guess you're getting an error response that's not handled properly. Try changing line 424 to


} elseif (is_array($response_array['Package'])) {

 

That looks like it worked..error reporting set to all..the error message is not there.

Thanks for the input

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Another....running php 7.2.7

With error reporting set to development level "all" I got this error message:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; usps has a deprecated constructor in /home/barkav5/public_html/includes/modules/shipping/usps.php on line 18

Changing line 25 from 

    function usps() {

to

    function __construct() {

seems to have dealt with that issue.  Error message is gone.

 

 


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

This add on looks to be working with the CE version of responsive osCommerce and running php 7.2, meaning orders are being processed with USPS postage as shipping.

I've already made some changes to pertinent files as per previous suggestions to deal with errors in the log.

A few issue still linger if anyone could help.

There's a couple notices and one warning as follows.

I am pasting the block of code around the error not just the line.....

PHP Notice:  Undefined index: Package in /home/barkav5/public_html/includes/modules/shipping/usps.php on line 424

      if (isset ($response_array['Package']['Postage']) && tep_not_null($response_array['Package']['Postage'])) {
        $service = $response_array['Package']['Postage']['MailService'];
        $temp_service = preg_replace( $pattern, '', $service );
        $response_array['Package']['Postage']['MailService'] = preg_replace( '/\s+/', ' ', $temp_service );
        $response_array['Package']['Postage']['DeliveryDays'] = $this->get_delivery_days( $pattern, $service );
      } elseif (is_array($response_array['Package'])) {  THIS IS LINE 424
        // Step through all of the quotes
        $count_services = count( $response_array['Package'] );
        for( $index=0; $index<$count_services; $index++ ) {
          $service = $response_array['Package'][$index]['Postage']['MailService'];

PHP Notice:  Undefined property: usps::$quotes in /home/barkav5/public_html/includes/classes/shipping.php on line 94

        foreach($this->modules as $value) {
          $class = substr($value, 0, strrpos($value, '.'));
          if ($GLOBALS[$class]->enabled) {
            $quotes = $GLOBALS[$class]->quotes; THIS IS LINE 94
            for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {
              if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {
                $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
                                 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
                                 'cost' => $quotes['methods'][$i]['cost']);


PHP Warning:  sizeof(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/classes/shipping.php on line 95

        foreach($this->modules as $value) {
          $class = substr($value, 0, strrpos($value, '.'));
          if ($GLOBALS[$class]->enabled) {
            $quotes = $GLOBALS[$class]->quotes;
            for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) { THIS IS LINE 95
              if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {
                $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
                                 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
                                 'cost' => $quotes['methods'][$i]['cost']);

If these are taken care of I'll try to figure out how to upload the CE / PHP 7.2 updates so others can benefit.

 


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×