PINES Stripe Customizations - Squashed rel_3_10_pines_stripe_customizations
authorTerran McCanna <tmccanna@georgialibraries.org>
Fri, 18 Nov 2022 18:28:21 +0000 (13:28 -0500)
committerTerran McCanna <tmccanna@georgialibraries.org>
Fri, 18 Nov 2022 18:38:54 +0000 (13:38 -0500)
Stripe - change minimum payment amount

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
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
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates-bootstrap/opac/myopac/main_payment_form.tt2

index 7cfc168..ded382c 100644 (file)
@@ -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",
index 78bba4a..8032aeb 100644 (file)
@@ -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};
index a774bb7..8fbe959 100755 (executable)
@@ -15,7 +15,7 @@
 <h3 class="sr-only">[% l('Pay Charges') %]</h3>
 [% IF ctx.fines.balance_owed <= 0 %]
 <div>
-    [% l("The minimum amount you can pay is \$0.01.") %]
+    [% l("The minimum amount you can pay is \$0.50.") %]
 </div>
 [% ELSE %]
 <div class="container">