Skip to content

Fixing a Sneaky Bug in the Avalara Tax Plugin for nopCommerce

The team at Aperture Labs thrives on solving tricky technical challenges, and recently, we uncovered an issue with the Avalara Tax Plugin for nopCommerce that was affecting a client’s store. After some investigation, we found the culprit and quickly implemented a fix — now, we’re sharing our solution to help others avoid the same headache.

 

The Problem: False Error Triggers

The Avalara Tax Plugin was unexpectedly flagging tax transactions as errors, even when they were successful. The issue? It was sending "message" objects in all cases, including successful transactions. This led to unnecessary disruptions in order processing.

 

The Fix: A Simple Yet Effective Update

We pinpointed the issue in AvalaraTaxManager at line 272:

if (transaction.messages?.Any() ?? false)

This logic was too broad, catching all messages regardless of severity. The fix? A refined check that filters out success messages:

if (transaction.messages?.Any(m => !"success".Equals(m.severity, StringComparison.CurrentCultureIgnoreCase)) ?? false)

Now, only non-success messages will trigger error handling, ensuring all valid transactions process without interruption.

 

The Takeaway: Fast troubleshooting matters 

Our deep experience with the nopCommerce platform allowed us to quickly uncover the root cause of this issue and deploy a rapid fix - ensuring our clients don’t experience any disruption in their order processing.  

If you’re using the Avalara Tax Plugin, apply this fix to prevent unnecessary errors or reach out to us - we’d be glad to help! 

 

Looking Ahead

nopCommerce is a fantastic open-source platform, with one of its core strengths being community-driven improvements. We will continue to join in the conversation with the vibrant nopCommerce developer community and share our insights to help clients extract maximum value from their nopCommerce site.