Merge pull request #6459 from turbo124/v5-develop

Fixes for Stripe exceptions
This commit is contained in:
David Bomba 2021-08-15 15:30:59 +10:00 committed by GitHub
commit b044be4db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -795,6 +795,10 @@ class InvoiceController extends BaseController
public function downloadPdf($invitation_key)
{
$invitation = $this->invoice_repo->getInvitationByKey($invitation_key);
if(!$invitation)
return response()->json(["message" => "no record found"], 400);
$contact = $invitation->contact;
$invoice = $invitation->invoice;

View File

@ -89,7 +89,7 @@ class StripePaymentDriver extends BaseDriver
if(strlen($this->company_gateway->getConfigField('account_id')) > 1)
$this->stripe_connect_auth = ["stripe_account" => $this->company_gateway->getConfigField('account_id')];
else
throw new \Exception('Stripe Connect has not been configured');
}
else

View File

@ -65,6 +65,7 @@ class HandleReversal extends AbstractService
/* Generate a credit for the $total_paid amount */
$notes = 'Credit for reversal of '.$this->invoice->number;
$credit = false;
if ($total_paid > 0) {