diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-05-28 15:36:23 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-05-28 15:52:00 +0200 |
| commit | cffd147cfd4767f57dc6deeb0a956361904e1b1b (patch) | |
| tree | 8a5990635ca60e0f34fc59462ed694847714db5b /addons/payment_authorize/models/authorize_request.py | |
| parent | e9350993ca0b81df17308766d7e26d458bc39520 (diff) | |
| parent | a20a31486cd0b99755f8e6c27281ac6ba4758b7a (diff) | |
[MERGE] forward port branch 11.0 up to a20a31486cd
Diffstat (limited to 'addons/payment_authorize/models/authorize_request.py')
| -rw-r--r-- | addons/payment_authorize/models/authorize_request.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index d9b87437577..109cf455f6d 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -224,6 +224,12 @@ class AuthorizeAPI(): etree.SubElement(customer, "email").text = partner.email or '' response = self._authorize_request(root) res = dict() + if not response.find('customerProfileId'): + _logger.warning( + 'Unable to create customer payment profile, data missing from transaction. Transaction_id: %s - Partner_id: %s' + % (transaction_id, partner) + ) + return res res['profile_id'] = response.find('customerProfileId').text res['payment_profile_id'] = response.find('customerPaymentProfileIdList/numericString').text root_profile = self._base_tree('getCustomerPaymentProfileRequest') |
