diff --git a/addons/iap/models/iap.py b/addons/iap/models/iap.py index 64830bfa24e..0c116ce6bc6 100644 --- a/addons/iap/models/iap.py +++ b/addons/iap/models/iap.py @@ -78,7 +78,7 @@ class IapTransaction(object): self.credit = None @contextlib.contextmanager -def charge(env, key, account_token, credit, description=None, credit_template=None): +def charge(env, key, account_token, credit, dbuuid=False, description=None, credit_template=None): """ Account charge context manager: takes a hold for ``credit`` amount before executing the body, then captures it if there @@ -103,6 +103,8 @@ def charge(env, key, account_token, credit, description=None, credit_template=No 'key': key, 'description': description, } + if dbuuid: + params.update({'dbuuid': dbuuid}) try: transaction_token = jsonrpc(endpoint + '/iap/1/authorize', params=params) except InsufficientCreditError as e: