lingo: pass item subject to eopayment (#46504)
This commit is contained in:
parent
6db674205c
commit
16d9a5cbfc
|
@ -398,6 +398,11 @@ class PayMixin(object):
|
|||
capture_date = items[0].capture_date
|
||||
if capture_date:
|
||||
kwargs['capture_date'] = capture_date
|
||||
if regie.can_pay_only_one_basket_item:
|
||||
if items and len(items) == 1:
|
||||
kwargs['subject'] = items[0].subject
|
||||
if remote_items and len(remote_items) == 1:
|
||||
kwargs['subject'] = remote_items[0].subject
|
||||
if regie.transaction_options:
|
||||
kwargs.update(regie.transaction_options)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -1547,6 +1547,7 @@ def test_successfull_items_can_pay_only_one_basket_item(app, basket_page, regie,
|
|||
|
||||
# successful payment
|
||||
qs = urlparse.parse_qs(urlparse.urlparse(resp.location).query)
|
||||
assert qs['subject'][0] == 'foo item', 'item.subject was not provided to eopayment'
|
||||
args = {'transaction_id': qs['transaction_id'][0], 'signed': True, 'ok': True, 'reason': 'Paid'}
|
||||
with mock.patch('combo.utils.requests_wrapper.RequestsSession.request') as request:
|
||||
resp = app.get(get_url(True, 'lingo-callback', regie), params=args)
|
||||
|
|
Loading…
Reference in New Issue