Bug 19173 - Make OPAC online payments pluggable
Summary: Make OPAC online payments pluggable
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Kyle M Hall
QA Contact: Tomás Cohen Arazi
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-24 12:56 UTC by Kyle M Hall
Modified: 2017-11-28 15:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: 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:
This development allows adding new payment methods through the use of Koha plugins. It provides institutions with more flexibility and an easier path to integrate local payment methods.


Attachments
Bug 19173 - Make OPAC online payments pluggable (11.43 KB, patch)
2017-08-24 13:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 - Make OPAC online payments pluggable (11.79 KB, patch)
2017-08-25 08:44 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list (2.03 KB, patch)
2017-08-25 10:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list (2.36 KB, patch)
2017-08-25 10:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list (2.47 KB, patch)
2017-08-25 12:55 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 19173 - Make OPAC online payments pluggable (11.88 KB, patch)
2017-09-05 11:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list (2.47 KB, patch)
2017-09-05 11:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 - Make OPAC online payments pluggable (11.97 KB, patch)
2017-09-05 11:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list (2.47 KB, patch)
2017-09-05 11:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19173: Make OPAC online payments pluggable (12.02 KB, patch)
2017-09-11 16:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19173: Add opac payment and marc conversion plugins to the pulldown filter list (3.46 KB, patch)
2017-09-11 16:05 UTC, Tomás Cohen Arazi
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 2017-08-24 12:56:56 UTC
While PayPal is fairly universally used worldwide, there is a plethora of online payment system that are far more localized, servicing a single country ( e.g. Bug 18968 ) or even a single  city! Instead of adding support for each and every one of these payment options directly into Koha, it makes more sense to add the ability to create online payment plugins.
Comment 1 Kyle M Hall 2017-08-24 13:52:18 UTC
Created attachment 66414 [details] [review]
Bug 19173 - Make OPAC online payments pluggable

While PayPal is fairly universal, there is a plethora of online payment system that are far more localized, servicing a single country ( e.g. Bug 18968 ) or even a single  city! Instead of adding support for each and every one of these payment options directly into Koha, it makes more sense to add the ability to create online payment plugins.

Test Plan:
1) Apply this patch
2) Download and install the Kitchen Sink plugin version 2.1.1 or later
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) In the plugin options, enable the opac payments option
4) Create a patron with one or more fines
5) Log into the opac as that patron, note you now have the option
   to pay online via KitchenSink ImaginaryPay
6) Make an online payment
7) Note the payment was processed correctly
Comment 2 Magnus Enger 2017-08-25 08:44:15 UTC
Created attachment 66464 [details] [review]
Bug 19173 - Make OPAC online payments pluggable

While PayPal is fairly universal, there is a plethora of online
payment system that are far more localized, servicing a single
country ( e.g. Bug 18968 ) or even a single  city! Instead of
adding support for each and every one of these payment options
directly into Koha, it makes more sense to add the ability to
create online payment plugins.

Test Plan:
1) Apply this patch
2) Download and install the Kitchen Sink plugin version 2.1.1 or later
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) In the plugin options, enable the opac payments option
4) Create a patron with one or more fines
5) Log into the opac as that patron, note you now have the option
   to pay online via KitchenSink ImaginaryPay
6) Make an online payment
7) Note the payment was processed correctly

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Awesome enhancement! I know we want to add at least one Norwegian
payment service at some point.
I followed the test plan and everything works as advertised. Turning
off the "opac payments option" makes the option dissappear cleanly
from the OPAC. I have *not* looked at the code or done any
considerations about security.
Comment 3 Magnus Enger 2017-08-25 08:48:45 UTC
Idea for improvement: On <intranet>/cgi-bin/koha/plugins/plugins-home.pl?method=tool there is a dropdown to limit the list of plugins by type. "OPAC payment" could be added to this list.
Comment 4 Kyle M Hall 2017-08-25 10:34:28 UTC
Created attachment 66472 [details] [review]
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list
Comment 5 Kyle M Hall 2017-08-25 10:48:53 UTC
Created attachment 66473 [details] [review]
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list
Comment 6 Magnus Enger 2017-08-25 12:55:31 UTC
Created attachment 66474 [details] [review]
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list

Signed-off-by: Magnus Enger <magnus@libriotech.no>
New categories are added to the pulldown and work as expected.
Comment 7 Kyle M Hall 2017-09-05 11:37:12 UTC
Created attachment 66839 [details] [review]
Bug 19173 - Make OPAC online payments pluggable

While PayPal is fairly universal, there is a plethora of online
payment system that are far more localized, servicing a single
country ( e.g. Bug 18968 ) or even a single  city! Instead of
adding support for each and every one of these payment options
directly into Koha, it makes more sense to add the ability to
create online payment plugins.

Test Plan:
1) Apply this patch
2) Download and install the Kitchen Sink plugin version 2.1.1 or later
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) In the plugin options, enable the opac payments option
4) Create a patron with one or more fines
5) Log into the opac as that patron, note you now have the option
   to pay online via KitchenSink ImaginaryPay
6) Make an online payment
7) Note the payment was processed correctly

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Awesome enhancement! I know we want to add at least one Norwegian
payment service at some point.
I followed the test plan and everything works as advertised. Turning
off the "opac payments option" makes the option dissappear cleanly
from the OPAC. I have *not* looked at the code or done any
considerations about security.
Comment 8 Kyle M Hall 2017-09-05 11:37:18 UTC
Created attachment 66840 [details] [review]
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list

Signed-off-by: Magnus Enger <magnus@libriotech.no>
New categories are added to the pulldown and work as expected.
Comment 9 Kyle M Hall 2017-09-05 11:38:52 UTC
Created attachment 66841 [details] [review]
Bug 19173 - Make OPAC online payments pluggable

While PayPal is fairly universal, there is a plethora of online
payment system that are far more localized, servicing a single
country ( e.g. Bug 18968 ) or even a single  city! Instead of
adding support for each and every one of these payment options
directly into Koha, it makes more sense to add the ability to
create online payment plugins.

Test Plan:
1) Apply this patch
2) Download and install the Kitchen Sink plugin version 2.1.1 or later
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) In the plugin options, enable the opac payments option
4) Create a patron with one or more fines
5) Log into the opac as that patron, note you now have the option
   to pay online via KitchenSink ImaginaryPay
6) Make an online payment
7) Note the payment was processed correctly

Sponsored-by: Washoe County Library System

Signed-off-by: Kyle M Hall <kyle@gmail.com>

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Awesome enhancement! I know we want to add at least one Norwegian
payment service at some point.
I followed the test plan and everything works as advertised. Turning
off the "opac payments option" makes the option dissappear cleanly
from the OPAC. I have *not* looked at the code or done any
considerations about security.
Comment 10 Kyle M Hall 2017-09-05 11:38:58 UTC
Created attachment 66842 [details] [review]
Bug 19173 [Followup] - Add opac payment and marc conversion plugins to the pulldown filter list

Signed-off-by: Magnus Enger <magnus@libriotech.no>
New categories are added to the pulldown and work as expected.
Comment 11 Tomás Cohen Arazi 2017-09-11 16:05:09 UTC
Created attachment 67047 [details] [review]
Bug 19173: Make OPAC online payments pluggable

While PayPal is fairly universal, there is a plethora of online
payment system that are far more localized, servicing a single
country ( e.g. Bug 18968 ) or even a single  city! Instead of
adding support for each and every one of these payment options
directly into Koha, it makes more sense to add the ability to
create online payment plugins.

Test Plan:
1) Apply this patch
2) Download and install the Kitchen Sink plugin version 2.1.1 or later
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) In the plugin options, enable the opac payments option
4) Create a patron with one or more fines
5) Log into the opac as that patron, note you now have the option
   to pay online via KitchenSink ImaginaryPay
6) Make an online payment
7) Note the payment was processed correctly

Sponsored-by: Washoe County Library System

Signed-off-by: Kyle M Hall <kyle@gmail.com>

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Awesome enhancement! I know we want to add at least one Norwegian
payment service at some point.
I followed the test plan and everything works as advertised. Turning
off the "opac payments option" makes the option dissappear cleanly
from the OPAC. I have *not* looked at the code or done any
considerations about security.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi 2017-09-11 16:05:19 UTC
Created attachment 67048 [details] [review]
Bug 19173: Add opac payment and marc conversion plugins to the pulldown filter list

Edit: fixed tab-for-space errors (tcohen).

Signed-off-by: Magnus Enger <magnus@libriotech.no>
New categories are added to the pulldown and work as expected.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2017-09-11 16:07:42 UTC
Nice addition, Kyle! This is the right use of the plugins system IMHO!
Many local payment methods exist that wouldn't make sense to bake into Koha
Comment 14 Jonathan Druart 2017-09-20 15:39:31 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 15 Jonathan Druart 2017-09-21 11:56:56 UTC
Hi Kyle,
Could you add documentation about how people can develop payment plugins?
Would it make sense to move the existing paypal method to a plugin?
Thanks!
Comment 16 Kyle M Hall 2017-10-04 13:35:28 UTC
(In reply to Jonathan Druart from comment #15)
> Hi Kyle,
> Could you add documentation about how people can develop payment plugins?
> Would it make sense to move the existing paypal method to a plugin?
> Thanks!

I think those are both capital ideas! I'll see what I can do.

Kyle
Comment 17 Fridolin SOMERS 2017-10-27 11:48:29 UTC
Enhancement not pushed to 17.05.x