From 27a67af7d40cf419d1c2000e1a7adaa56b73f138 Mon Sep 17 00:00:00 2001 From: felipeminello Date: Thu, 8 Sep 2022 15:05:57 -0300 Subject: [PATCH] corrigindo tratamento de erro preapproval (#286) --- src/MercadoPago/Entity.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MercadoPago/Entity.php b/src/MercadoPago/Entity.php index af602752..fd85923d 100755 --- a/src/MercadoPago/Entity.php +++ b/src/MercadoPago/Entity.php @@ -265,16 +265,16 @@ public function save($options = []) function process_error_body($message){ $recuperable_error = new RecuperableError( $message['message'], - $message['error'], + (isset($message['error']) ? $message['error'] : ''), $message['status'] ); - - if(isset($message['cause'])) + if (isset($message['cause'])) { $recuperable_error->proccess_causes($message['cause']); - + } $this->error = $recuperable_error; } + /** * @param $name *