diff --git a/poundpay.php b/poundpay.php index 4250e0e..20eab49 100755 --- a/poundpay.php +++ b/poundpay.php @@ -201,8 +201,8 @@ public function __construct($url, $text, $status_code) { $this->is_error = FALSE; if($this->error_msg = ($status_code >= 400)) { $this->is_error = TRUE; - $this->error_name = $this->response_json['error_name']; - $this->error_msg = $this->response_json['error_message']; + $this->error_name = $this->response_json->error_name; + $this->error_msg = $this->response_json->error_message; } }