Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21609 - Correctly handle PayPalPro recurring payments whose amoun… #11463

Merged
merged 1 commit into from
Jan 10, 2018

Conversation

MegaphoneJon
Copy link
Contributor

…t doesn't match the initial contribution

Overview

If you make a recurring contribution of, say, $10/month with PayPal Pro, then change the amount to a different amount ($12/month), the card will be charged $12 but recorded as $10 in CiviCRM.

Before

See above.

After

Payment is recorded for the correct amount.

Technical Details

The Contribution.repeattransaction API passes through the $input[total_amount] value to the contribution create method. However, the value is stored in $input[amount], not $input[total_amount] for PayPal Pro.

Comments

I realize this could be more concise by initializing $input[total_amount] when we initialize $input['amount']. However, I have a private patch to support failed PayPal recurring payments that I'd like to pass upstream that would be affected.

@eileenmcnaughton
Copy link
Contributor

Where I would like to go on this code is to have a function on CRM_Core_Payment called getAmount - there seem to be a few places where it is being calculated. I'm not opposed to merging this though since it solves a problem & seems harmless

@eileenmcnaughton eileenmcnaughton merged commit 861f3aa into civicrm:master Jan 10, 2018
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21609 - Correctly handle PayPalPro recurring payments whose amoun…
@mlutfy mlutfy added this to the 4.7.31 milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants