[Koha-bugs] [Bug 23213] OPAC check mimimum payment threshold from payment plugin

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 28 21:19:14 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23213

--- Comment #3 from Agustín Moyano <agustinmoyano at 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/4c66444ff697586dff3d8759c1e5746c/koha-plugin-pay-via-paypal-v1.0.0.kpz
and one without threshold as
https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/download/v1.0.5/koha-plugin-pay-via-paygov-v1.0.5.kpz
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.


More information about the Koha-bugs mailing list