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
|
// @debug: only defined on a cockpit refund
|
||||||
if (c::app()->balanced_debug) {
|
if (c::app()->balanced_debug) {
|
||||||
echo '<pre>'; var_dump($response);
|
echo '<pre>'; var_dump($response); exit;
|
||||||
}
|
}
|
||||||
if (property_exists($response->body, 'errors'))
|
if (property_exists($response->body, 'errors'))
|
||||||
$error = Error::createFromResponse($response);
|
$error = Error::createFromResponse($response);
|
||||||
|
|||||||
@ -2119,8 +2119,6 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
|
|
||||||
// Refund the gift
|
// Refund the gift
|
||||||
$this->refundGiftFromOrder();
|
$this->refundGiftFromOrder();
|
||||||
|
|
||||||
c::app()->balanced_debug = true;
|
|
||||||
|
|
||||||
if ( intval( $this->charged() ) > 0 ) {
|
if ( intval( $this->charged() ) > 0 ) {
|
||||||
|
|
||||||
@ -2157,7 +2155,8 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
$res = $hold->void();
|
$res = $hold->void();
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
print_r($e);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
Log::debug([
|
Log::debug([
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user