error handling changes

This commit is contained in:
arzynik 2014-11-10 17:45:04 -08:00
parent 2dbb92b781
commit f4beee09b5
2 changed files with 3 additions and 4 deletions

View File

@ -22,7 +22,7 @@ class Resource extends \RESTful\Resource
{
// @debug: only defined on a cockpit refund
if (c::app()->balanced_debug) {
echo '<pre>'; var_dump($response);
echo '<pre>'; var_dump($response); exit;
}
if (property_exists($response->body, 'errors'))
$error = Error::createFromResponse($response);

View File

@ -2120,8 +2120,6 @@ class Crunchbutton_Order extends Cana_Table {
// Refund the gift
$this->refundGiftFromOrder();
c::app()->balanced_debug = true;
if ( intval( $this->charged() ) > 0 ) {
if ($this->pay_type == self::PAY_TYPE_CREDIT_CARD) {
@ -2157,7 +2155,8 @@ class Crunchbutton_Order extends Cana_Table {
$res = $hold->void();
} catch (Exception $e) {
print_r($e);
return false;
}
if (!$res) {
Log::debug([