diff --git a/lib/spree/chimpy/interface/order_upserter.rb b/lib/spree/chimpy/interface/order_upserter.rb index 0e16a8c..5c7ec4c 100644 --- a/lib/spree/chimpy/interface/order_upserter.rb +++ b/lib/spree/chimpy/interface/order_upserter.rb @@ -64,10 +64,10 @@ def order_hash id: @order.number, lines: lines, order_total: @order.total.to_f, - financial_status: @order.payment_state, - fulfillment_status: @order.shipment_state, + financial_status: @order.payment_state || "", + fulfillment_status: @order.shipment_state || "", currency_code: @order.currency, - processed_at_foreign: @order.completed_at ? @order.completed_at.to_formatted_s(:db) : nil, + processed_at_foreign: @order.completed_at ? @order.completed_at.to_formatted_s(:db) : "", updated_at_foreign: @order.updated_at.to_formatted_s(:db), shipping_total: @order.ship_total.to_f, tax_total: @order.try(:included_tax_total).to_f + @order.try(:additional_tax_total).to_f,