Development #30272
tipi: incompatible avec lingo
100%
Description
Lingo ne passe pas de paramètre orderid, qu'oblige à utiliser le backend tipi pour générer son paramètre obligatoire refdet.
Là https://www.collectivites-locales.gouv.fr/files/files/finances_locales/moy_paiement/tipi/guide_tipi_regies_2016.pdf on lit page 11 :
L'API d'eopayment étant un peu déterminé par ceux qui l'utilisent, i.e. désormais lingo je suis tout prêt à dire qu'orderid doit être toujours optionnel et donc :de 6 à 30 caractères,
SAISIE LIBRE (caractères alphanumériques, pas de caractères spéciaux, proscrire les tirets)
- si orderid et refdet, erreur
- si orderid est passé mais ne correspond pas au format voulu, on génère un refdet, YYYYMMDDHHMM+<RANDOM>, orderid mis dans objet convertir en ASCII, tronquer à 100 caractères
+ ' ' + YYYYMMDDHHMM
- si orderid au format refdet, on l'utilise tel quel
- si refdet est passé mais pas dans le format, erreur
- si ni orderid ni refdet, on génère refdet comme plus haut
- si refdet/orderid sont None, générer un truc rentrant dans le format et le renvoyer comme transaction_id
- passer orderid dans objet
- forcer lingo à passer un orderid (c'est plus propre mais ça pourrait casser les autres backends), par exemple
transaction.id
Fichiers
Révisions associées
tipi: update TIPI_URL (#30272)
tipi: use english labels for parameters (#30272)
tipi: add possible choices for saisie parameter (#30272)
tox.ini: remove basepython (#30272)
It becomes useless if python version is in the environment descriptors.
tipi: implement automatic generation of REFDET (fixes #30272)
Historique
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Fichier 0001-tipi-PEP8ness-30272.patch 0001-tipi-PEP8ness-30272.patch ajouté
- Fichier 0006-tox.ini-remove-basepython-30272.patch 0006-tox.ini-remove-basepython-30272.patch ajouté
- Fichier 0002-tipi-update-TIPI_URL-30272.patch 0002-tipi-update-TIPI_URL-30272.patch ajouté
- Fichier 0007-tipi-implement-automatic-generation-of-REFDET-fixes-.patch 0007-tipi-implement-automatic-generation-of-REFDET-fixes-.patch ajouté
- Fichier 0003-tipi-use-english-labels-for-parameters-30272.patch 0003-tipi-use-english-labels-for-parameters-30272.patch ajouté
- Fichier 0004-tipi-add-possible-choice-for-saisie-parameter-30272.patch 0004-tipi-add-possible-choice-for-saisie-parameter-30272.patch ajouté
- Fichier 0005-pep8-merge.patch 0005-pep8-merge.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Un peu de nettoyage du module TIPI au passage.
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
Pour rappel lingo fait ça :
kwargs = { 'email': email, 'first_name': firstname, 'last_name': lastname } if items: capture_date = items[0].capture_date if capture_date: kwargs['capture_date'] = capture_date (order_id, kind, data) = payment.request(total_amount, **kwargs)
Donc on passe, amount, email, first_name, last_name et éventuellement capture_date dont tipi n'a rien à foutre.
Je pousse des test modifiés qui mettent plus cela en valeur.
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Fichier 0001-tipi-PEP8ness-30272.patch 0001-tipi-PEP8ness-30272.patch ajouté
- Fichier 0006-tox.ini-remove-basepython-30272.patch 0006-tox.ini-remove-basepython-30272.patch ajouté
- Fichier 0002-tipi-update-TIPI_URL-30272.patch 0002-tipi-update-TIPI_URL-30272.patch ajouté
- Fichier 0007-tipi-implement-automatic-generation-of-REFDET-fixes-.patch 0007-tipi-implement-automatic-generation-of-REFDET-fixes-.patch ajouté
- Fichier 0003-tipi-use-english-labels-for-parameters-30272.patch 0003-tipi-use-english-labels-for-parameters-30272.patch ajouté
- Fichier 0004-tipi-add-possible-choice-for-saisie-parameter-30272.patch 0004-tipi-add-possible-choice-for-saisie-parameter-30272.patch ajouté
- Fichier 0005-pep8-merge.patch 0005-pep8-merge.patch ajouté
Les voilà.
Mis à jour par Serghei Mihai il y a environ 5 ans
- Statut changé de Solution proposée à Solution validée
Si tu peux, merge les 2 commits PEP8 et go.
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Statut changé de Solution validée à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit 7ac96b4f1e407c8a3324269d46ccc064b98ccbe4.
Mis à jour par Frédéric Péters il y a environ 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
tipi: PEP8ness (#30272)