From d8dccde98e363b08da5b6e289a48d04bdfb466c2 Mon Sep 17 00:00:00 2001 From: artyom-89 Date: Wed, 1 Jul 2020 23:03:00 +0300 Subject: [PATCH] fix(payment-response): fix error code and error description fields --- lib/Response/AbstractPaymentResponse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Response/AbstractPaymentResponse.php b/lib/Response/AbstractPaymentResponse.php index 5957ee7..57cc870 100644 --- a/lib/Response/AbstractPaymentResponse.php +++ b/lib/Response/AbstractPaymentResponse.php @@ -24,7 +24,7 @@ public function __construct(array $response) if (isset($response['error'])) { $error = new PaymentError(); $error->setCode($response['error']['code']); - $error->setCode($response['error']['description']); + $error->setDescription($response['error']['description']); $this->setError($error); } @@ -56,4 +56,4 @@ public function __construct(array $response) $this->setTest((boolean) $response['test']); } -} \ No newline at end of file +}