CRM-21609 - Correctly handle PayPalPro recurring payments whose amoun… #11463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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.