[Bug 23213] New: OPAC check mimimum payment threshold from payment plugin
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Bug ID: 23213 Summary: OPAC check mimimum payment threshold from payment plugin Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: agustinmoyano@theke.io QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Blocks: 20211 Target Milestone: --- Add the ability in OPAC to check if the plugin has a minimum payment threshold. If the amount that the patron is lower than the threshold declared by the plugin then payment is not allowed. For example, if PayPal is going to charge $2 for every transaction, don't allow payments through that plugin to be less than $3. The logic to determine the minimum threshold is hold in the plugin itself. Plugins that defines a threshold should declare a new hook named Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20211 [Bug 20211] Guarantor/Guarantee and payments ideas [OMNIBUS] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #1 from Agustín Moyano <agustinmoyano@theke.io> --- Change this line
If the amount that the patron is lower than the threshold declared by the plugin then payment is not allowed.
for: If the amount the patron is about to pay is lower than the threshold declared by the plugin then payment is not allowed for that specific plugin. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #2 from Agustín Moyano <agustinmoyano@theke.io> ---
Plugins that defines a threshold should declare a new hook named
named opac_online_payment_threshold -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |agustinmoyano@theke.io |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23214 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23214 [Bug 23214] OPAC add ability to pay guarantees fines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23118 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23118 [Bug 23118] Copy PayPal logic into plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 91122 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91122&action=edit Bug 23213: Enable minimum payment threshold check in OPAC This patch enables OPAC to check for the miminum payment threshold per payment method. If the total amount to pay is less than the threshold, payment for that method is disabled. To test: 1) apply dependencies 2) get 2 payment plugins, one with threshold as https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/uploads... and one without threshold as https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/down... 3) install both plugins 4) Configure both plugins to work correctly (can be invented data.. we are not interested in the actual payment page, but to test if payment method is allowed) 5) In plugin with threshold, set minimum threshold to 10 6) Fetch any user, and create 2 manual invoices, both for the amount of 5 7) Enter OPAC as user, and go to "my fines" tab CHECK => both plugins appear as payment method 8) Check the checkbox of one of the fines SUCCESS => plugin with threshold is now disabled, and has a warning message that says "Minimum amount needed by this service is 10.00" => plugin without threshold is enabled => if plugin with threshold was selected, "Make payment" button is disabled until an enabled payment method is selected 9) Check the second checkbox SUCCESS => both payment methods are now enabled 10) Sign off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As a note to this one.. I think it really ought to have been written independently of bug 23214 really.. it was a surprise to see that as a dependency here as really they're pretty unrelated changes. I will however on this occasion look to testing both to save you a refactor. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- On second thoughts.. the tree beneath bug 23214 is fairly large and currently blocked by an FQA bug.. will wait on that to test this, but in effect, it means this bug is blocked.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #6 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Martin Renvoize from comment #4)
As a note to this one.. I think it really ought to have been written independently of bug 23214 really.. it was a surprise to see that as a dependency here as really they're pretty unrelated changes.
I will however on this occasion look to testing both to save you a refactor.
My bad. I'll try to take that into account the next time Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23118 Depends on|23118 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23118 [Bug 23118] Create a plugin to implement the PayPal payments logic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91122|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 93140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93140&action=edit Bug 23213: Enable minimum payment threshold check in OPAC This patch enables OPAC to check for the miminum payment threshold per payment method. If the total amount to pay is less than the threshold, payment for that method is disabled. To test: 1) apply dependencies 2) get 2 payment plugins, one with threshold as https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/uploads... and one without threshold as https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/down... 3) install both plugins 4) Configure both plugins to work correctly (can be invented data.. we are not interested in the actual payment page, but to test if payment method is allowed) 5) In plugin with threshold, set minimum threshold to 10 6) Fetch any user, and create 2 manual invoices, both for the amount of 5 7) Enter OPAC as user, and go to "my fines" tab CHECK => both plugins appear as payment method 8) Check the checkbox of one of the fines SUCCESS => plugin with threshold is now disabled, and has a warning message that says "Minimum amount needed by this service is 10.00" => plugin without threshold is enabled => if plugin with threshold was selected, "Make payment" button is disabled until an enabled payment method is selected 9) Check the second checkbox SUCCESS => both payment methods are now enabled 10) Sign off Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Does what is says on the tin, Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93140|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 93144 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93144&action=edit Bug 23213: Enable minimum payment threshold check in OPAC This patch enables OPAC to check for the miminum payment threshold per payment method. If the total amount to pay is less than the threshold, payment for that method is disabled. To test: 1) apply dependencies 2) get 2 payment plugins, one with threshold as https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/uploads... and one without threshold as https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/down... 3) install both plugins 4) Configure both plugins to work correctly (can be invented data.. we are not interested in the actual payment page, but to test if payment method is allowed) 5) In plugin with threshold, set minimum threshold to 10 6) Fetch any user, and create 2 manual invoices, both for the amount of 5 7) Enter OPAC as user, and go to "my fines" tab CHECK => both plugins appear as payment method 8) Check the checkbox of one of the fines SUCCESS => plugin with threshold is now disabled, and has a warning message that says "Minimum amount needed by this service is 10.00" => plugin without threshold is enabled => if plugin with threshold was selected, "Make payment" button is disabled until an enabled payment method is selected 9) Check the second checkbox SUCCESS => both payment methods are now enabled 10) Sign off Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Bug 23213 depends on bug 23214, which changed state. Bug 23214 Summary: OPAC add ability to pay guarantees fines https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23214 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 23214 not in 19.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23868 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23868 [Bug 23868] PayPal payment button is never enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Fines and fees |Plugin architecture -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|OPAC check mimimum payment |Add hook to opac payments |threshold from payment |to allow plugins to set |plugin |minimum payment threshold -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|Add hook to opac payments |Add hook to OPAC payments |to allow plugins to set |to allow plugins to set |minimum payment threshold |minimum payment threshold Keywords| |Manual --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should we add this to https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- We certainly should, well spotted Katrin. Agustin, could you take care of adding this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 --- Comment #14 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Martin Renvoize from comment #13)
We certainly should, well spotted Katrin. Agustin, could you take care of adding this?
Thanks Katrin for spotting it. Hook description was added. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26193 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org