From 523b4533f8878d81857fdbe9558ed430eefcc0d5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 5 May 2021 10:16:50 -0300 Subject: [PATCH] Bug 23215: Remove traces of the PayPal feature This patch removes the PayPal payments feature. It has been moved to its' own plugin. To test: 1. Apply this patches 2. Run: $ updatedatabase => SUCCESS: Database updates correctly 3. Run: $ koha-mysql kohadev > SELECT * FROM systempreferences WHERE variable LIKE 'paypal'; => SUCCESS: No results 4. On the sysprefs, OPAC section => SUCCESS: No PayPal-related sysprefs show up 5. Add some charges to your patron 6. In the OPAC, log in and see your charges => SUCCESS: Nothing broken 7. Install the PayPal plugin [1] or any other payment plugin 8. Restart plack (mandatory for the PayPal plugin) 9. Set some random data in the config (or better, real sandbox testing data) 10. Go to the OPAC's account page and try to pay your debts (use the checkbox to select lines) => SUCCESS: The PayPal payment method shows, you can click the button, it fails due to bad config, but things work as expected. 11. Sign off :-D [1] https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/-/releases Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- about.pl | 4 - .../intranet-tmpl/prog/en/modules/about.tt | 9 +- .../bootstrap/en/includes/account-table.inc | 13 -- .../en/modules/opac-account-pay-error.tt | 8 -- .../bootstrap/en/modules/opac-account.tt | 15 +-- opac/opac-account-pay-paypal-return.pl | 125 ------------------ opac/opac-account-pay.pl | 103 ++------------- opac/opac-account.pl | 5 +- 8 files changed, 19 insertions(+), 263 deletions(-) delete mode 100755 opac/opac-account-pay-paypal-return.pl diff --git a/about.pl b/about.pl index 90b434904c..bfe39dbd73 100755 --- a/about.pl +++ b/about.pl @@ -421,10 +421,6 @@ if ( C4::Context->preference('WebBasedSelfCheck') ); } -if ( C4::Context->preference('EnablePayPalOpacPayments') ) { - $template->param( paypal_enabled => 1 ); -} - # Test YAML system preferences # FIXME: This is list of current YAML formatted prefs, should by type of preference my @yaml_prefs = ( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index d2d4eea04e..62ce7c1602 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -299,7 +299,7 @@ Contact your system administrator. [% END %] - [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || paypal_enabled %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]

Warnings regarding the system configuration

@@ -403,13 +403,6 @@ [% END %] [% END %] - [% IF paypal_enabled %] - - [% END %] [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' && elasticsearch_status.version.substr(0,1) < 6 %]
Preferences and parameters
Warning - You are using the PayPal functionality, which is now deprecated and replaced in favor of using payment plugins that can implement - different payment services. Please install the plugin and follow the migration instructions in order to keep enjoying the PayPal - integration. This feature will be removed from Koha in a short term. -
Deprecation warning Elasticsearch version 5.x is not supported in Koha 20.11 and greater. Please upgrade your Elasticsearch cluster diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc index e79ab14c6a..3f3e76f44a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -142,19 +142,6 @@ Pay selected fines and charges

Payment method

- [% IF Koha.Preference('EnablePayPalOpacPayments') %] -
- -
- [% END %] - [% FOREACH p IN plugins %]