0001-lingo-handle-exceptions-raised-by-backend.request-40.patch
combo/apps/lingo/views.py | ||
---|---|---|
397 | 397 |
kwargs['capture_date'] = capture_date |
398 | 398 |
if regie.transaction_options: |
399 | 399 |
kwargs.update(regie.transaction_options) |
400 |
(order_id, kind, data) = payment.request(total_amount, **kwargs) |
|
401 | 400 |
logger = logging.getLogger(__name__) |
401 |
try: |
|
402 |
(order_id, kind, data) = payment.request(total_amount, **kwargs) |
|
403 |
except eopayment.common.PaymentException as e: |
|
404 |
logger.error(u'failed to initiate payment request: %s', e) |
|
405 |
return HttpResponseBadRequest('Failed to initiate payment request') |
|
402 | 406 |
logger.info(u'emitted payment request with id %s', smart_text(order_id), extra={ |
403 | 407 |
'eopayment_order_id': smart_text(order_id), 'eopayment_data': repr(data)}) |
404 | 408 |
transaction.order_id = order_id |
405 |
- |