Projet

Général

Profil

Development #47477

lingo : dans le cas du payment d'un item unique, transmettre reference_id à eopayment

Ajouté par Benjamin Dauvergne il y a plus de 3 ans. Mis à jour il y a plus de 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
08 octobre 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Comme #46504 le but étant d'arriver à transmettre à terme l'intitulé et la référence d'une facture à PayFiP ce qui terminera le support de celui-ci coté initiation du paiement (il restera le contrôle en tâche de fond des transactions initiées).


Fichiers

0003-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch (3,15 ko) 0003-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch Benjamin Dauvergne, 10 octobre 2020 12:10
0001-lingo-refactor-unique-item-payment-request-47506.patch (4,13 ko) 0001-lingo-refactor-unique-item-payment-request-47506.patch Benjamin Dauvergne, 10 octobre 2020 12:10
0002-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch (2,32 ko) 0002-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch Benjamin Dauvergne, 10 octobre 2020 12:10
0004-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch (2,89 ko) 0004-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch Benjamin Dauvergne, 10 octobre 2020 12:10
0007-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch (3,13 ko) 0007-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0003-lingo-simplify-extraction-of-subject-for-single-paym.patch (1,08 ko) 0003-lingo-simplify-extraction-of-subject-for-single-paym.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0006-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch (2,35 ko) 0006-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0005-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch (2,36 ko) 0005-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0002-lingo-document-handle_payment-contract-with-assert-4.patch (2,16 ko) 0002-lingo-document-handle_payment-contract-with-assert-4.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0004-tests-factorize-single-payment-regie-fixture-47506.patch (3,05 ko) 0004-tests-factorize-single-payment-regie-fixture-47506.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0001-lingo-move-error-message-to-PayView-47506.patch (980 octets) 0001-lingo-move-error-message-to-PayView-47506.patch Benjamin Dauvergne, 23 octobre 2020 17:03
0007-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch (3,13 ko) 0007-lingo-pass-PayFip-specific-data-to-eopayment-for-uni.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0003-lingo-simplify-extraction-of-subject-for-single-paym.patch (1,08 ko) 0003-lingo-simplify-extraction-of-subject-for-single-paym.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0006-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch (2,35 ko) 0006-lingo-pass-reference_id-to-eopayment-as-orderid-for-.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0005-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch (2,36 ko) 0005-lingo-allow-passing-custom-kwargs-to-eopayment.reque.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0002-lingo-document-handle_payment-contract-with-assert-4.patch (2,16 ko) 0002-lingo-document-handle_payment-contract-with-assert-4.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0004-tests-factorize-single-payment-regie-fixture-47506.patch (3,05 ko) 0004-tests-factorize-single-payment-regie-fixture-47506.patch Benjamin Dauvergne, 26 octobre 2020 20:37
0001-lingo-move-error-message-to-PayView-47506.patch (1,17 ko) 0001-lingo-move-error-message-to-PayView-47506.patch Benjamin Dauvergne, 26 octobre 2020 20:37

Révisions associées

Révision e0d4d2b2 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: move error message to PayView (#47477)

Révision 1c22405e (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: document handle_payment contract with assert (#47477)

Révision e1887d03 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: simplify extraction of subject for single payment (#47477)

Révision 543debcc (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

tests: factorize single payment regie fixture (#47477)

Révision 84f2f8fd (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: allow passing custom kwargs to eopayment.request (#47477)

Révision 8f899a93 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: pass reference_id to eopayment as orderid for unique item payment (#47477)

Révision e5d9087f (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

lingo: pass PayFip specific data to eopayment for unique item payment (#47477)

Historique

#2

Mis à jour par Benjamin Dauvergne il y a plus de 3 ans

  • Sujet changé de lingo : lingo : dans le cas du payment d'un item unique, transmettre reference_id à eopayment à lingo : dans le cas du payment d'un item unique, transmettre reference_id à eopayment
#3

Mis à jour par Benjamin Dauvergne il y a plus de 3 ans

  • Assigné à mis à Benjamin Dauvergne
#4

Mis à jour par Benjamin Dauvergne il y a plus de 3 ans

Ça gère trois cas :
  • le cas générique avec reference_id qui devient orderid pour tous les backends qui le gèrent (avec un rappel de comment ça marche dans chaque backend),
  • le cas TIPI/PayFiP en étant explicite sur refdet/exer parce que ça parle plus aux comptables,
  • les cas futurs dont on a pas idée et aussi pour permettre de gérer certaines extensions spécifiques à un backend via eopayment_request_kwargs_xxx.
#5

Mis à jour par Valentin Deniaud il y a plus de 3 ans

0001 : rien compris, les asserts vérifient des trucs déjà garantis par les conditions en début de fonction, et après item = (items or remote_items)[0] alors qu'il ne peut pas y avoir remote_items.

Side note et tant qu'à faire un commit de refactoring, ça sort d'où bool(len(items)) == bool(len(remote_items)) que j'ai laissé passé dans #46504 ? Quid de items and remote_items ? Aussi, le message 'Grouping basket items is not allowed.' est un mauvais copier coller.

0002 : ça sert à quoi ?

0003 : enlever le commentaire, lingo n'a pas à documenter comment fonctionne eopayment, notamment personne n'ira maintenir ce texte au prochain changement dans un backend.

#6

Mis à jour par Benjamin Dauvergne il y a plus de 3 ans

0001: je suis revenu sur ce que j'ai fait, j'ai remis ton message initial dans PayView et j'ai laissé les assert dans handle_payment(), les assert documentent juste ce qui est attendu par handle_payment() et le contrôle d'erreur est par contre bien fait dans la vue.

J'ai séparé ce premier commit en 4, les deux premiers c'est ce que je viens de décrire, le 3ème c'est juste de faire (items or remote_items) basé sur ce qu'on sait du contrat de handle_payment() (ça simplifie les commits suivants), et le dernier c'est juste d'ajouter un test sur les régies mono-paiement avec une fixture adaptée.

0005: (ancien 0002), c'est pour ne pas me taper un commit à chaque paramètre tordu d'un backend, Toulouse vient de me donner un prétexte, #47990.

0006: (ancien 0003), ok.

#8

Mis à jour par Valentin Deniaud il y a plus de 3 ans

C'est rouge.

#10

Mis à jour par Valentin Deniaud il y a plus de 3 ans

  • Statut changé de Solution proposée à Solution validée
#11

Mis à jour par Benjamin Dauvergne il y a plus de 3 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit e5d9087f3e506b37718cba422b5403d2add82cd7
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Oct 10 09:02:07 2020 +0200

    lingo: pass PayFip specific data to eopayment for unique item payment (#47477)

commit 8f899a93764ecfa5ea9e7ca6326be1a2bd72abb1
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Oct 10 09:01:42 2020 +0200

    lingo: pass reference_id to eopayment as orderid for unique item payment (#47477)

commit 84f2f8fd1070b1fb0778f118acf279457bc18c60
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Oct 10 08:28:09 2020 +0200

    lingo: allow passing custom kwargs to eopayment.request (#47477)

commit 543debcc2e1cacb23c517b8dffb524be1c805ccb
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Oct 23 16:57:05 2020 +0200

    tests: factorize single payment regie fixture (#47477)

commit e1887d03843196bc1c880460e8b81efe15ed0c3f
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Oct 23 16:56:26 2020 +0200

    lingo: simplify extraction of subject for single payment (#47477)

commit 1c22405e8ba90961374832182712b70782270762
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Oct 10 08:26:00 2020 +0200

    lingo: document handle_payment contract with assert (#47477)

commit e0d4d2b2f576fab810c626e90edd28285a936945
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Oct 23 16:55:53 2020 +0200

    lingo: move error message to PayView (#47477)
#12

Mis à jour par Frédéric Péters il y a plus de 3 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF