From 9ed7864c17f34a5d0cc56bf0c018edf05aad3599 Mon Sep 17 00:00:00 2001 From: andrea longhi Date: Mon, 25 May 2020 18:40:35 +0200 Subject: Use shipping_calculator lambda for order shipping param `APIParams#order_params` should use the `shipping_calculator` lambda instead of a hardcoded value for providing shipping costs to TaxJar. --- lib/super_good/solidus_taxjar/api_params.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/super_good/solidus_taxjar/api_params.rb b/lib/super_good/solidus_taxjar/api_params.rb index 6458018..b3c02fe 100644 --- a/lib/super_good/solidus_taxjar/api_params.rb +++ b/lib/super_good/solidus_taxjar/api_params.rb @@ -7,7 +7,7 @@ module SuperGood .merge(customer_params(order)) .merge(order_address_params(order.tax_address)) .merge(line_items_params(order.line_items)) - .merge(shipping: order.shipment_total) + .merge(shipping: shipping(order)) .merge(SuperGood::SolidusTaxJar.custom_order_params.(order)) .tap do |params| next unless SuperGood::SolidusTaxJar.logging_enabled -- cgit v1.2.3