Include discounts in amount sent to hosted page
Include discounts in amount sent to hosted page

We received a report from a user indicating that the WooCommerce plugin
did not handle discounts. When a discount was applied to a purchase it
would not be applied to the amount sent to Komoju to create a payment.

It turns out this was because we're constructing the order amount
ourselves, and had forgotten to include the discount amount from the
order. The reason we're calculating the amount ourselves is because the
Hosted Page API expects the total tax amount on the order to be passed
as a separate value, so using the inbuilt WooCommerce get_total would
not work for the API.

Since we just want to strip the tax from the amount we send, the plugin
has been updated to take the order total and remove the tax total from
it, which should be a more robust solution.

komoju/komoju-woocommerce,komoju/komoju-woocommerce