Feature request from mynameismud, posted on GitHub Jun 20, 2017
Preconditions
v2.1.3
You need a standard Paypal account
You need a Payflow Pro account also
NOTE: It appears that ANY two Paypal types of accounts would suffice for this test. This is a general issue with validation in Ipn.php, not an issue specific to these two methods.
Steps to reproduce
Enable Paypal Express Checkout and process a payment using it
Disable Paypal Express Checkout
Enable Payflow Pro and process a payment using it
Create a credit memo for the Paypal Express Checkout payment via Magento Admin or log into paypal.com and process a refund directly there
Expected result
Paypal should send the IPN and it should pass validation then trigger appropriate business logic.
Actual result
In Ipn.php, line 110, the validation logic checks to see if the payment method is both active AND available. It seems that this should ONLY check isMethodAvailable. In cases where the merchant swaps out payment methods (in our case we changed from Paypal to Payflow Pro), the merchant still needs to be able to process reference transactions against older payments originated with the now-inactive method.
It might be preferable to make the validation more specific and only perform this check against AUTH and SALE transactions. Then refunds, etc would be excluded from the check.
Example from exceptions.log:
[2017-06-15 23:26:36] main.CRITICAL: Exception: Method "paypal_express" is not available. in /var/www/.../vendor/magento/module-paypal/Model/Ipn.php:124
... View more