Payments sent to Stripe can be off by one cent

Bug #1708728 reported by Michele Morgan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.11
Fix Released
Medium
Unassigned

Bug Description

Evergreen 2.12.2

When using Stripe as the credit card payment processor, payments registered in Stripe can be one cent less than the same payment in Evergreen. This appears to be caused by the same perl int() function referenced in bug 1282751 comment #5:

https://bugs.launchpad.net/evergreen/+bug/1282751/comments/5

This instance of the int() function is used in the Stripe branch in Money.pm.

Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Revision history for this message
Michele Morgan (mmorgan) wrote :

Working branch is at:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1708728_fix_stripe_cc_payments_off_by_one_cent

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

To reproduce/test:

- Add a bill to a patron record in one of the following amounts:

$8.20
$8.19
$9.95
$8.54

All these amounts fail this test:

perl -e 'print "no match\n" unless ((8.20 * 100) == int(8.20 * 100))';

- 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.

tags: added: pullrequest
Changed in evergreen:
assignee: Michele Morgan (mmorgan) → nobody
Kathy Lussier (klussier)
Changed in evergreen:
status: New → Triaged
milestone: none → 3.0-alpha
Revision history for this message
Dan Pearl (dpearl) wrote :

I will test this.

Changed in evergreen:
assignee: nobody → Dan Pearl (dpearl)
Revision history for this message
Dan Pearl (dpearl) wrote :
Changed in evergreen:
assignee: Dan Pearl (dpearl) → nobody
tags: added: signedoff
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, rel_2_12, and rel_2_11. Thanks, Michele and Dan!

Changed in evergreen:
milestone: 3.0-alpha → 2.12.5
no longer affects: evergreen/2.12
Changed in evergreen:
status: Triaged → Fix Committed
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.