error handling changes
This commit is contained in:
parent
2dbb92b781
commit
f4beee09b5
@ -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);
|
||||
|
||||
@ -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([
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user