[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. bde94c24336eaacb39113be5b3faaca207f99051

Evergreen Git git at git.evergreen-ils.org
Wed Aug 23 16:03:46 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_12 has been updated
       via  bde94c24336eaacb39113be5b3faaca207f99051 (commit)
      from  77f4c0ce8361989a8b38c660a966f7250dcab1ab (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bde94c24336eaacb39113be5b3faaca207f99051
Author: Michele Morgan <mmorgan at noblenet.org>
Date:   Wed Aug 9 11:36:20 2017 -0400

    LP 1708728 - Fix Stripe penny errors introduced by perl int() function
    
    Fixes the issue where payment amounts sent to Stripe can be one cent less
    than the actual Evergreen payment due to use of the perl int() function.
    
    To test
    -------
    A Stripe account is required to view transactions on the Stripe side.
    To enable test payments, Stripe testing API keys need to be entered
    in the Evergreen ou settings:
    
    credit.processor.stripe.pubkey
    credit.processor.stripe.secretkey
    
    - Add a bill to a patron record with the following amounts: $8.20
    - Login to the opac as the patron and pay the bill.
    - View the transaction on the Stripe side and see that it is one cent
      less than the paid bill in Evergreen.
    - Apply the patch.
    - Repeat the steps above.
    
    - On the Stripe side, see that the Stripe amount and Evergreen amount
      now match.
    
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Dan Pearl <dpearl at cwmars.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

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 c434b15..17c496b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
@@ -101,7 +101,7 @@ sub process_stripe_or_bop_payment {
     if ($cc_args->{processor} eq 'Stripe') { # Stripe
         my $stripe = Business::Stripe->new(-api_key => $psettings->{secretkey});
         $stripe->charges_create(
-            amount => int($total_paid * 100.0), # Stripe takes amount in pennies
+            amount => ($total_paid * 100), # Stripe takes amount in pennies
             card => $cc_args->{stripe_token},
             description => $cc_args->{note}
         );

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Money.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list