Skip to content

Commit

Permalink
Fix Failed IPN changing to Payment Received incorrectly (#617) (#2183)
Browse files Browse the repository at this point in the history
Co-authored-by: Ricardo Velhote <rvelhote@users.noreply.github.com>
  • Loading branch information
fballiano and rvelhote committed Jun 3, 2022
1 parent 53b2a6d commit 3ff1827
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

0 comments on commit 3ff1827

Please sign in to comment.