Skip to content

Commit dda5d92

Browse files
committed
added verbose gate errors
1 parent ab5a0a1 commit dda5d92

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Classes/Api/PaynetApi.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ private function execute(string $action, array $data): array {
7373
foreach ($result as $k => $v)
7474
$result[$k] = rtrim($v);
7575

76+
if ($result['type'] == 'validation-error')
77+
throw new PayneteasyException("Payneteasy reports error: {$result['error-message']}", [ 'response' => $response ]);
78+
7679
return $result;
7780
}
7881
}

0 commit comments

Comments
 (0)