Better webhooks (#155)
* Enable Pro plan - WIP * no pricing page if have no paid plans * Set pricing ids in env * views & submissions FREE for all * extra param for env * form password FREE for all * Custom Code is PRO feature * Replace codeinput prism with codemirror * Better form Cleaning message * Added risky user email spam protection * fix form cleaning * Custom SEO * fix custom seo formcleaner * Better webhooks * fix test case
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Models\Integration;
|
||||
|
||||
use App\Models\Forms\Form;
|
||||
use App\Service\Forms\Webhooks\WebhookHandlerProvider;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -27,11 +28,13 @@ class FormZapierWebhook extends Model
|
||||
return $this->belongsTo(Form::class);
|
||||
}
|
||||
|
||||
public function triggerHook(array $data) {
|
||||
WebhookCall::create()
|
||||
->url($this->hook_url)
|
||||
->doNotSign()
|
||||
->payload($data)
|
||||
->dispatch();
|
||||
public function triggerHook(array $data)
|
||||
{
|
||||
WebhookHandlerProvider::getProvider(
|
||||
$this->form,
|
||||
$data,
|
||||
WebhookHandlerProvider::ZAPIER_PROVIDER,
|
||||
$this->hook_url
|
||||
)->handle();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user