Added extra error handling and debugging
This commit is contained in:
parent
2bf5911860
commit
f950bf05a1
|
@ -14,19 +14,19 @@ class Bitpay_Core_IndexController extends Mage_Core_Controller_Front_Action
|
||||||
*/
|
*/
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$params = $this->getRequest()->getParams();
|
|
||||||
$paid = false;
|
$paid = false;
|
||||||
if (isset($params['paid'])) {
|
$params = $this->getRequest()->getParams();
|
||||||
|
|
||||||
|
if (true === isset($params['paid'])) {
|
||||||
Mage::helper('bitpay')->registerAutoloader();
|
Mage::helper('bitpay')->registerAutoloader();
|
||||||
Mage::helper('bitpay')->debugData(
|
Mage::helper('bitpay')->debugData($params);
|
||||||
$params
|
} else {
|
||||||
);
|
Mage::helper('bitpay')->debugData('[ERROR] Could not get params from request.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->loadLayout();
|
$this->loadLayout();
|
||||||
|
|
||||||
$this->getResponse()->setHeader('Content-type', 'application/json');
|
$this->getResponse()->setHeader('Content-type', 'application/json');
|
||||||
$this->getResponse()->setBody(
|
$this->getResponse()->setBody(json_encode(array('paid' => $paid)));
|
||||||
json_encode(array('paid' => $paid))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue