0001-lingo-update-default-TIPI-payment-service-URL-47537.patch
combo/apps/lingo/migrations/0028_tipipaymentformcell.py | ||
---|---|---|
26 | 26 |
('restricted_to_unlogged', models.BooleanField(default=False, verbose_name='Restrict to unlogged users')), |
27 | 27 |
('last_update_timestamp', models.DateTimeField(auto_now=True)), |
28 | 28 |
('title', models.CharField(max_length=150, verbose_name='Title', blank=True)), |
29 |
('url', models.URLField(default=b'https://www.tipi.budget.gouv.fr/tpa/paiement.web', verbose_name='TIPI payment service URL')),
|
|
29 |
('url', models.URLField(default=b'http://www.payfip.gouv.fr/tpa/paiement.web', verbose_name='TIPI payment service URL')),
|
|
30 | 30 |
('regies', models.CharField(help_text='separated by commas', max_length=256, verbose_name='Regies')), |
31 | 31 |
('control_protocol', models.CharField(default=b'pesv2', max_length=8, verbose_name='Control protocol', choices=[(b'pesv2', 'Indigo/PES v2'), (b'rolmre', 'ROLMRE')])), |
32 | 32 |
('test_mode', models.BooleanField(default=False, verbose_name='Test mode')), |
combo/apps/lingo/models.py | ||
---|---|---|
810 | 810 |
@register_cell_class |
811 | 811 |
class TipiPaymentFormCell(CellBase): |
812 | 812 |
title = models.CharField(_('Title'), max_length=150, blank=True) |
813 |
url = models.URLField(_('TIPI payment service URL'), default='https://www.tipi.budget.gouv.fr/tpa/paiement.web')
|
|
813 |
url = models.URLField(_('TIPI payment service URL'), default='http://www.payfip.gouv.fr/tpa/paiement.web')
|
|
814 | 814 |
regies = models.CharField( |
815 | 815 |
_('Regies'), |
816 | 816 |
help_text=_('Values separated by commas. It is possible to add a label after a regie identifier. ' |
tests/test_lingo_cells.py | ||
---|---|---|
203 | 203 |
cell.order = 0 |
204 | 204 |
cell.save() |
205 | 205 |
assert cell.control_protocol == 'pesv2' |
206 |
assert cell.url == 'https://www.tipi.budget.gouv.fr/tpa/paiement.web'
|
|
206 |
assert cell.url == 'http://www.payfip.gouv.fr/tpa/paiement.web'
|
|
207 | 207 |
assert cell.template_name == 'lingo/tipi_form.html' |
208 | 208 |
html = cell.render({}) |
209 | 209 |
assert "<h2>TIPI Payment</h2>" in html |
210 |
- |