From: Terran McCanna Date: Fri, 18 Nov 2022 18:28:21 +0000 (-0500) Subject: PINES Stripe Customizations - Squashed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ac2594f6029b7226370805ff66f8f1ce674db6a9;p=evergreen%2Fpines.git 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 --- 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 dab791836f..8032aeb608 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -2331,7 +2331,8 @@ sub load_myopac_payment_form { my $stripe = Business::Stripe->new(-api_key => $skey); my $intent = $stripe->api('post', 'payment_intents', amount => $self->ctx->{fines}->{balance_owed} * 100, - currency => $currency || 'usd' + currency => $currency || 'usd', + 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 %]