Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function updateOrderStatusAction()
// if the hash doesn't match the data sent by Apruve terminate the code
if ($identifier != $hash) {
$this->getResponse()->setHeader("HTTP/1.1", "404", true);
Mage::helper('apruvepayment')->logException("hash mismatch, expected" . $hash . " got " . $identifier);
return;
}

Expand All @@ -45,6 +46,7 @@ public function updateOrderStatusAction()
if ($event == 'invoice.funded' || $event == 'invoice.closed') {
$invoiceId = $entity->merchant_invoice_id;
if (! $this->_capturePayment($invoiceId)) {
Mage::helper('apruvepayment')->logException("Unable to capture payment");
$this->getResponse()->setHeader("HTTP/1.1", "404", true);
return;
};
Expand Down Expand Up @@ -88,6 +90,8 @@ protected function _capturePayment($invoiceId)

if ($invoice && $invoice->canCapture()) {
$iApi->capture($invoiceId);
} else {
Mage::helper('apruvepayment')->logException("Invoice " . $invoiceId . " does not exist or cannot be captured");
};
}

Expand Down