[FIX] pos_mercury: set the paid amount to what is authorized by Mercury

Mercury can partially approve transactions in case a card does not
have enough credit available to cover the full amount.

Before this the payment amount was kept as the full purchase amount
leading to a difference between what Mercury charged and what Odoo
registered as charged.

opw-1840946
This commit is contained in:
Joren Van Onder
2018-05-18 13:23:08 -07:00
parent 612fd33fb1
commit 0fd06e5948
@@ -440,6 +440,7 @@ PaymentScreenWidget.include({
order.selected_paymentline.paid = true;
order.selected_paymentline.mercury_swipe_pending = false;
order.selected_paymentline.mercury_amount = response.authorize;
order.selected_paymentline.set_amount(response.authorize);
order.selected_paymentline.mercury_card_number = decodedMagtek['number'];
order.selected_paymentline.mercury_card_brand = response.card_type;
order.selected_paymentline.mercury_card_owner_name = decodedMagtek['name'];