LP#1969994: Stripe: Add User Database ID
authorTerran McCanna <tmccanna@georgialibraries.org>
Fri, 22 Apr 2022 21:12:47 +0000 (17:12 -0400)
committerJason Boyer <JBoyer@equinoxOLI.org>
Tue, 15 Nov 2022 13:24:08 +0000 (08:24 -0500)
Adds the patron's database ID to the payment intent so that
payments can be more easily reconciled with the Evergreen
database.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index dab7918..78bba4a 100644 (file)
@@ -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           => 'User Database ID: ' . $self->ctx->{user}->id
         );
         if ($stripe->success) {
             $self->ctx->{stripe_client_secret} = $stripe->success()->{client_secret};