From 07515901d584ac7ed68c26b3b2b5b012877584c6 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Fri, 18 Nov 2022 13:28:21 -0500 Subject: [PATCH] PINES Stripe Customizations - Squashed Stripe - change minimum payment amount Signed-off-by: Terran McCanna alter logging to learn more about stripe failures PINES Stripe Customizations Note - most prior customizations were accepted into master for 3.9 and 3.10 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm | 4 ++-- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 2 +- Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index 7cfc16821d..ded382c8ec 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -106,7 +106,7 @@ sub process_stripe_or_bop_payment { my $stripe = Business::Stripe->new(-api_key => $psettings->{secretkey}); $stripe->api('post','payment_intents/' . $cc_args->{stripe_payment_intent}); if ($stripe->success) { - $logger->debug('Stripe payment intent retrieved'); + $logger->info('Stripe payment intent retrieved'); my $intent = $stripe->success; if ($intent->{status} eq 'succeeded') { $logger->info('Stripe payment succeeded'); @@ -128,7 +128,7 @@ sub process_stripe_or_bop_payment { ); } } else { - $logger->debug('Stripe payment intent not retrieved'); + $logger->info('Stripe payment intent not retrieved'); $logger->info('Stripe payment failed'); return OpenILS::Event->new( "CREDIT_PROCESSOR_DECLINED_TRANSACTION", diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 78bba4acac..8032aeb608 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -2332,7 +2332,7 @@ sub load_myopac_payment_form { my $intent = $stripe->api('post', 'payment_intents', amount => $self->ctx->{fines}->{balance_owed} * 100, currency => $currency || 'usd', - description => 'User Database ID: ' . $self->ctx->{user}->id + description => 'PINES User Database ID: ' . $self->ctx->{user}->id ); if ($stripe->success) { $self->ctx->{stripe_client_secret} = $stripe->success()->{client_secret}; diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2 index a774bb707b..8fbe95919c 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2 @@ -15,7 +15,7 @@

[% l('Pay Charges') %]

[% IF ctx.fines.balance_owed <= 0 %]
- [% l("The minimum amount you can pay is \$0.01.") %] + [% l("The minimum amount you can pay is \$0.50.") %]
[% ELSE %]
-- 2.11.0