Skip to content

Commit

Permalink
Fix an issue with Failed IPN changing to Payment Received incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
rvelhote committed Mar 7, 2019
1 parent a567f09 commit 51c037d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/code/core/Mage/Paypal/Model/Ipn.php
Expand Up @@ -532,6 +532,11 @@ protected function _registerPaymentDenial()
protected function _registerPaymentFailure()
{
$this->_importPaymentInformation();

foreach ($this->_order->getInvoiceCollection() as $invoice){
$invoice->cancel()->save();
}

$this->_order
->registerCancellation($this->_createIpnComment(''), false)
->save();
Expand Down

1 comment on commit 51c037d

@seansan
Copy link
Contributor

@seansan seansan commented on 51c037d Feb 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied this in our repo, looks good

Please sign in to comment.