mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
update error view
This commit is contained in:
parent
616e9c4eac
commit
f0b8fef4e7
@ -130,7 +130,12 @@ class TransactionCreationsController extends AppController
|
|||||||
'transaction_base64' => base64_encode($builderResult['transactionBody']->serializeToString()),
|
'transaction_base64' => base64_encode($builderResult['transactionBody']->serializeToString()),
|
||||||
'balance' => $user['balance']
|
'balance' => $user['balance']
|
||||||
]);
|
]);
|
||||||
$json = $response->getJson();
|
//$json = $response->getJson();
|
||||||
|
try {
|
||||||
|
$json = $response->getJson();
|
||||||
|
} catch(Exception $ex) {
|
||||||
|
$this->Flash->error(__('result isn\'t json ') . $ex->getMessage());
|
||||||
|
}
|
||||||
if($json['state'] != 'success') {
|
if($json['state'] != 'success') {
|
||||||
if($json['msg'] == 'session not found') {
|
if($json['msg'] == 'session not found') {
|
||||||
$session->destroy();
|
$session->destroy();
|
||||||
@ -297,7 +302,11 @@ class TransactionCreationsController extends AppController
|
|||||||
//die($transactionbody);
|
//die($transactionbody);
|
||||||
$response = $http->post($url . '/checkTransaction', $transactionbody, ['type' => 'json']);
|
$response = $http->post($url . '/checkTransaction', $transactionbody, ['type' => 'json']);
|
||||||
//var_dump($response->getStringBody());
|
//var_dump($response->getStringBody());
|
||||||
$json = $response->getJson();
|
try {
|
||||||
|
$json = $response->getJson();
|
||||||
|
} catch(Exception $ex) {
|
||||||
|
$this->Flash->error(__('result isn\'t json ') . $ex->getMessage());
|
||||||
|
}
|
||||||
if($json['state'] != 'success') {
|
if($json['state'] != 'success') {
|
||||||
if($json['msg'] == 'session not found') {
|
if($json['msg'] == 'session not found') {
|
||||||
$session->destroy();
|
$session->destroy();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user