mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Throw exception on paytrace failure
This commit is contained in:
parent
7a267b4406
commit
f270fbe2d6
@ -26,7 +26,7 @@ class ValidAmount implements Rule
|
||||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
return (bool) is_float($value) || is_int($value);
|
||||
return (bool) is_float($value) || preg_match('#[^0-9]#',$value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace App\PaymentDrivers;
|
||||
|
||||
use App\Exceptions\SystemError;
|
||||
use App\Jobs\Util\SystemLogger;
|
||||
use App\Models\ClientGatewayToken;
|
||||
use App\Models\GatewayType;
|
||||
@ -192,7 +193,7 @@ class PaytracePaymentDriver extends BaseDriver
|
||||
$auth_data = json_decode($response);
|
||||
|
||||
if(!property_exists($auth_data, 'access_token'))
|
||||
throw new \Exception('Error authenticating with PayTrace');
|
||||
throw new SystemError('Error authenticating with PayTrace');
|
||||
|
||||
$headers = [];
|
||||
$headers[] = 'Content-type: application/json';
|
||||
|
Loading…
x
Reference in New Issue
Block a user