summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/payment_authorize/models/payment.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/payment_authorize/models/payment.py b/addons/payment_authorize/models/payment.py
index 93403af7104..d6e08fda0e5 100644
--- a/addons/payment_authorize/models/payment.py
+++ b/addons/payment_authorize/models/payment.py
@@ -253,15 +253,15 @@ class TxAuthorize(models.Model):
'Please make sure the token has a valid acquirer reference.'))
if not self.acquirer_id.capture_manually:
- res = transaction.auth_and_capture(self.payment_token_id, self.amount, self.reference)
+ res = transaction.auth_and_capture(self.payment_token_id, round(self.amount, self.currency_id.decimal_places), self.reference)
else:
- res = transaction.authorize(self.payment_token_id, self.amount, self.reference)
+ res = transaction.authorize(self.payment_token_id, round(self.amount, self.currency_id.decimal_places), self.reference)
return self._authorize_s2s_validate_tree(res)
def authorize_s2s_capture_transaction(self):
self.ensure_one()
transaction = AuthorizeAPI(self.acquirer_id)
- tree = transaction.capture(self.acquirer_reference or '', self.amount)
+ tree = transaction.capture(self.acquirer_reference or '', round(self.amount, self.currency_id.decimal_places))
return self._authorize_s2s_validate_tree(tree)
def authorize_s2s_void_transaction(self):