mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6767 from turbo124/v5-develop
Catching exceptions when payment gateway throw exceptions
This commit is contained in:
commit
616e783f9d
@ -23,6 +23,7 @@ use App\Models\PaymentType;
|
|||||||
use App\Services\AbstractService;
|
use App\Services\AbstractService;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use PDO;
|
||||||
|
|
||||||
class AutoBillInvoice extends AbstractService
|
class AutoBillInvoice extends AbstractService
|
||||||
{
|
{
|
||||||
@ -113,10 +114,17 @@ class AutoBillInvoice extends AbstractService
|
|||||||
|
|
||||||
nlog("Payment hash created => {$payment_hash->id}");
|
nlog("Payment hash created => {$payment_hash->id}");
|
||||||
|
|
||||||
|
$payment = false;
|
||||||
|
|
||||||
|
try{
|
||||||
$payment = $gateway_token->gateway
|
$payment = $gateway_token->gateway
|
||||||
->driver($this->client)
|
->driver($this->client)
|
||||||
->setPaymentHash($payment_hash)
|
->setPaymentHash($payment_hash)
|
||||||
->tokenBilling($gateway_token, $payment_hash);
|
->tokenBilling($gateway_token, $payment_hash);
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
nlog($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
if($payment){
|
if($payment){
|
||||||
info("Auto Bill payment captured for ".$this->invoice->number);
|
info("Auto Bill payment captured for ".$this->invoice->number);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user