We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Authorize.net API bug with negative line items

Expresso Store

Derek Hogue's avatar
Derek Hogue
317 posts
one month ago
Derek Hogue's avatar Derek Hogue

Hey folks - the Authorize.net API does not allow negative line items, so when there is a discount in an order, the API call fails. e.g.

Error: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:unitPrice' element is invalid - The value '-506.25' is invalid according to its datatype 'Decimal' - The MinInclusive constraint failed.

I fixed this by adding a getItems() method to the gateway which simply returns false, but you may want to fix it another way.

       
VincentWoodard's avatar
VincentWoodard
6 posts
2 weeks ago
VincentWoodard's avatar VincentWoodard

Thanks for bringing this to light! I totally see where you’re coming from regarding the negative line items issue. It’s definitely a tricky bug that could cause real headaches. However, have you considered how tweaking the integration might help handle those cases better? Just a thought! speedstars

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.