mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Configure webhooks on gateway creation
This commit is contained in:
parent
4b796fe362
commit
a96ff66dee
@ -23,6 +23,7 @@ use App\Http\Requests\CompanyGateway\UpdateCompanyGatewayRequest;
|
|||||||
use App\Jobs\Util\ApplePayDomain;
|
use App\Jobs\Util\ApplePayDomain;
|
||||||
use App\Models\Client;
|
use App\Models\Client;
|
||||||
use App\Models\CompanyGateway;
|
use App\Models\CompanyGateway;
|
||||||
|
use App\PaymentDrivers\Stripe\Jobs\StripeWebhook;
|
||||||
use App\Repositories\CompanyRepository;
|
use App\Repositories\CompanyRepository;
|
||||||
use App\Transformers\CompanyGatewayTransformer;
|
use App\Transformers\CompanyGatewayTransformer;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
@ -212,6 +213,11 @@ class CompanyGatewayController extends BaseController
|
|||||||
|
|
||||||
ApplePayDomain::dispatch($company_gateway, $company_gateway->company->db);
|
ApplePayDomain::dispatch($company_gateway, $company_gateway->company->db);
|
||||||
|
|
||||||
|
if(in_array($company_gateway->gateway_key, $this->stripe_keys))
|
||||||
|
{
|
||||||
|
StripeWebhook::dispatch($company_gateway->company->company_key, $company_gateway->id);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->itemResponse($company_gateway);
|
return $this->itemResponse($company_gateway);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ class StripeWebhook implements ShouldQueue
|
|||||||
\Stripe\WebhookEndpoint::update($endpoint->id, ['enabled_events' => $this->events], $stripe->stripe_connect_auth);
|
\Stripe\WebhookEndpoint::update($endpoint->id, ['enabled_events' => $this->events], $stripe->stripe_connect_auth);
|
||||||
|
|
||||||
$this->url_found = true;
|
$this->url_found = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user