From 9ff950788296f3931ce41cac7b84be9424b27630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=A4fer?= Date: Mon, 6 Dec 2021 14:14:56 +0100 Subject: [PATCH 1/2] Make function definition compatible with parent --- app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php b/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php index b13d67b..ad9b657 100644 --- a/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php +++ b/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php @@ -14,7 +14,7 @@ class Xonu_PayPalInvoiceSender_Model_Ipn extends Mage_Paypal_Model_Ipn /** * Process completed payment (either full or partial) */ - protected function _registerPaymentCapture() + protected function _registerPaymentCapture($skipFraudDetection = false) { if ($this->getRequestData('transaction_entity') == 'auth') { return; From 284452d630df4d71f628bfcf690693307772b7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=A4fer?= Date: Mon, 6 Dec 2021 14:18:35 +0100 Subject: [PATCH 2/2] Update to current core version --- .../community/Xonu/PayPalInvoiceSender/Model/Ipn.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php b/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php index ad9b657..48c18fd 100644 --- a/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php +++ b/app/code/community/Xonu/PayPalInvoiceSender/Model/Ipn.php @@ -19,14 +19,19 @@ protected function _registerPaymentCapture($skipFraudDetection = false) if ($this->getRequestData('transaction_entity') == 'auth') { return; } + $parentTransactionId = $this->getRequestData('parent_txn_id'); $this->_importPaymentInformation(); $payment = $this->_order->getPayment(); $payment->setTransactionId($this->getRequestData('txn_id')) + ->setCurrencyCode($this->getRequestData('mc_currency')) ->setPreparedMessage($this->_createIpnComment('')) - ->setParentTransactionId($this->getRequestData('parent_txn_id')) + ->setParentTransactionId($parentTransactionId) ->setShouldCloseParentTransaction('Completed' === $this->getRequestData('auth_status')) ->setIsTransactionClosed(0) - ->registerCaptureNotification($this->getRequestData('mc_gross')); + ->registerCaptureNotification( + $this->getRequestData('mc_gross'), + $skipFraudDetection && $parentTransactionId + ); $this->_order->save(); // notify customer