Bug 16899 - Add ability to disallow overpayments via SIP
Summary: Add ability to disallow overpayments via SIP
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 16895
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-11 15:36 UTC by Kyle M Hall
Modified: 2017-10-27 17:13 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 16899 - Add ability to disallow overpayments (7.05 KB, patch)
2016-07-11 15:55 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (7.33 KB, patch)
2016-07-11 16:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (7.33 KB, patch)
2016-08-09 13:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16899 - Add ability to disallow overpayments (7.40 KB, patch)
2016-09-16 13:03 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (5.56 KB, patch)
2017-03-21 13:01 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (5.48 KB, patch)
2017-03-21 13:03 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (5.45 KB, patch)
2017-06-07 13:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (4.99 KB, patch)
2017-10-26 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16899 - Add ability to disallow overpayments (5.08 KB, patch)
2017-10-27 06:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2016-07-11 15:36:35 UTC
Some SIP services ( such as Comprise ) require that an attempt at over-paying a patron's account via SIP2 should fail, rather than create a credit on the account. We should make this a configurable option on a per-login basis in the SIP2 config file.
Comment 1 Kyle M Hall 2016-07-11 15:55:15 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2016-07-11 16:16:30 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-08-09 13:21:10 UTC
Created attachment 54203 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed
Comment 4 Kyle M Hall 2016-09-16 13:03:53 UTC
Created attachment 55615 [details] [review]
[SIGNED-OFF] Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Comment 5 Marcel de Rooy 2017-03-17 07:15:20 UTC
Also depends on a PNA
Comment 6 Kyle M Hall 2017-03-21 13:01:24 UTC
Created attachment 61378 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Comment 7 Kyle M Hall 2017-03-21 13:03:16 UTC
Created attachment 61379 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Comment 8 Marcel de Rooy 2017-05-03 14:21:22 UTC
Global symbol "$patron" requires explicit package name at /usr/share/koha/masterclone/C4/SIP/ILS/Transaction/FeePayment.pm line 60.
Comment 9 Kyle M Hall 2017-06-07 13:44:38 UTC
Created attachment 64080 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Comment 10 Marcel de Rooy 2017-09-01 08:58:10 UTC
+++ b/Koha/Account/Lines.pm
+sub amount_outstanding {

You add this sub, but you are not using it ? And not testing it ?

This needs feedback. Thanks.
Comment 11 Kyle M Hall 2017-10-26 13:08:40 UTC
(In reply to Marcel de Rooy from comment #10)
> +++ b/Koha/Account/Lines.pm
> +sub amount_outstanding {
> 
> You add this sub, but you are not using it ? And not testing it ?
> 
> This needs feedback. Thanks.

Ended up not needing the sub. I'll remove it.
Comment 12 Kyle M Hall 2017-10-26 13:09:20 UTC
Created attachment 68604 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Comment 13 Marcel de Rooy 2017-10-27 06:46:37 UTC
Created attachment 68656 [details] [review]
Bug 16899 - Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 14 Jonathan Druart 2017-10-27 17:13:05 UTC
Pushed to master for 17.11, thanks to everybody involved!