Unable to cancel or amend a PayPal Express recurring transaction
Hello
I created a contribution page using the PayPal Express payment processor. When I used it to set up a recurring contribution, it seemed to be set up ok, but I was unable to cancel or amend it, either using the link in the email or from with CiviCRM. After a bit of digging, the reason turned out to be that the processor_id field in the civicrm_contribution_recur table was not being set. The reason for this appears to be that one of the IPNs from PayPal was being ignored.
In order to get this to work, I modified /CRM/Core/Payment/PayPalImpl.php:
679c679,680
< if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
---
> if ( ($this->_paymentProcessor['payment_processor_type'] == 'PayPal_Express') ||
> ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') ) {
and also CRM/Core/Payment/PayPalProIPN.php:
563c564
< if ($input['txnType'] != 'recurring_payment') {
---
> if ( ($input['txnType'] != 'recurring_payment') &&($input['txnType']!='recurring_payment_profile_created') ) {
Now I can cancel the recurring payments and also the application sends an additional email to the customer.
Regards,
Carl