cubecart / v6

CubeCart Version 6
https://cubecart.com
72 stars 59 forks source link

UPS API Expected Data Type #3400

Closed bhsmither closed 11 months ago

bhsmither commented 11 months ago

For PackageWeight/Weight, the UPS API is asking for a string. See:

https://developer.ups.com/api/reference?loc=en_US#operation/Rate!path=RateRequest/Shipment/Package/PackageWeight/Weight&t=request

(The page scrolls to Weight, but is hidden under the top sticky banner.)

However, shipping.class.php, line 315, $item['product_weight'] may be a numerical data type.

The PHP function json_encode() might not quote that value.

Suggest type casting to string.

(Not confirmed.)

See:

https://forums.cubecart.com/topic/58667-trouble-with-ups-module/
abrookbanks commented 11 months ago

Thanks Brian. Fixed with the latest release.

bhsmither commented 11 months ago

The UPS 2.0.4 package has a USPS module in it.

Also, suggest reviewing the forum topic for specific handling of dimension values.

abrookbanks commented 11 months ago

whoooops... fixed I'll check...

I know my dyslexia would get me on UPS and USPS one day!