Bug 23868 - PayPal payment button is never enabled
Summary: PayPal payment button is never enabled
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker (vote)
Assignee: Agustín Moyano
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 23213
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-22 11:36 UTC by Andrew Isherwood
Modified: 2020-11-30 21:45 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt (1.62 KB, patch)
2019-11-04 18:17 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt (1.69 KB, patch)
2019-11-05 17:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt (1.75 KB, patch)
2019-11-06 17:42 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2019-10-22 11:36:41 UTC
Enabling and configuring "EnablePayPalOpacPayments PayPalSandboxMode" works fine. But when it comes to paying a fine in the OPAC, the "Make payment" button is never enabled. It is disabled initially, but is supposed to be enabled if at least one fine is selected to be paid.

This it the line that is supposed to enable it (now commented out):

https://github.com/PTFS-Europe/koha/blob/master/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt#L104

it was commented out as part of Bug 23213 - is this an oversight or is this functionality now superseded?
Comment 1 Andrew Isherwood 2019-10-22 11:46:23 UTC
Looking further into it, I think my initial conclusion was wrong. Uncommenting that line doesn't cause the button to be enabled when a fine is selected. There is reference to elements with a `data-threshold` attribute, which I cannot find in my markup, so I am now wondering if this PayPal functionality is dependent on the plugins mentioned in Bug 23213. In short, I'm confused!
Comment 2 Katrin Fischer 2019-11-03 21:57:41 UTC
Tomas or Kyle, can you help here?
Comment 3 Agustín Moyano 2019-11-04 18:17:36 UTC
Created attachment 95029 [details] [review]
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt

This patch fixes a bug introduced by checking payment plugins threshold

To test:
1. do not apply this patch
2. configure paypal options in intranet
3. create a manual invoice for a patron
4. in opac try to pay that invoice
CHECK => Make Payment button is disabled, even when invoices where checked.
5. apply this patch
6. repeat step 4
SUCCESS => Make Payment button is enabled when an invoice is checked.
7. Sign off
Comment 4 Jonathan Druart 2019-11-05 17:09:12 UTC
Created attachment 95066 [details] [review]
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt

This patch fixes a bug introduced by checking payment plugins threshold

To test:
1. do not apply this patch
2. configure paypal options in intranet
3. create a manual invoice for a patron
4. in opac try to pay that invoice
CHECK => Make Payment button is disabled, even when invoices where checked.
5. apply this patch
6. repeat step 4
SUCCESS => Make Payment button is enabled when an invoice is checked.
7. Sign off

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Katrin Fischer 2019-11-06 17:42:56 UTC
Created attachment 95119 [details] [review]
Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt

This patch fixes a bug introduced by checking payment plugins threshold

To test:
1. do not apply this patch
2. configure paypal options in intranet
3. create a manual invoice for a patron
4. in opac try to pay that invoice
CHECK => Make Payment button is disabled, even when invoices where checked.
5. apply this patch
6. repeat step 4
SUCCESS => Make Payment button is enabled when an invoice is checked.
7. Sign off

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-11-06 17:43:20 UTC
Just changing: String patch = Interface/GUI strings, changing to Trivial.
Comment 7 Martin Renvoize 2019-11-07 09:12:45 UTC
Nice work!

Pushed to master for 19.11.00
Comment 8 Fridolin Somers 2019-11-15 07:53:00 UTC
Depends on Bug 23213 not in 19.05.x