[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:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user