Skip to content

Commit 3ff1827

Browse files
fballianorvelhote
andauthored
Fix Failed IPN changing to Payment Received incorrectly (#617) (#2183)
Co-authored-by: Ricardo Velhote <[email protected]>
1 parent 53b2a6d commit 3ff1827

File tree

1 file changed

+5
-0
lines changed
  • app/code/core/Mage/Paypal/Model

1 file changed

+5
-0
lines changed

app/code/core/Mage/Paypal/Model/Ipn.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,11 @@ protected function _registerPaymentDenial()
532532
protected function _registerPaymentFailure()
533533
{
534534
$this->_importPaymentInformation();
535+
536+
foreach ($this->_order->getInvoiceCollection() as $invoice){
537+
$invoice->cancel()->save();
538+
}
539+
535540
$this->_order
536541
->registerCancellation($this->_createIpnComment(''), false)
537542
->save();

0 commit comments

Comments
 (0)