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.
Created attachment 53272 [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
Created attachment 53275 [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
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
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>
Also depends on a PNA
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>
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>
Global symbol "$patron" requires explicit package name at /usr/share/koha/masterclone/C4/SIP/ILS/Transaction/FeePayment.pm line 60.
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>
+++ 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.
(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.
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>
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>
Pushed to master for 17.11, thanks to everybody involved!