DocumentaciónDeveloper guideCrear un complemento
Controladores de pago, envío y SMS
Un complemento de proveedor registra una clase de controlador. La pantalla compartida Integraciones muestra entonces sus ajustes, su botón de prueba y su dirección de webhook.
1 min de lectura
- Extienda
App\Support\Integrations\IntegrationDriver. Implementekey(),kind(),label(),credentialFields()ytestConnection()(app/Support/Integrations/IntegrationDriver.php:24-45). - Regístrelo desde un hook de arranque:
IntegrationRegistry::register(KEY, Driver::class)(app/Support/Integrations/IntegrationRegistry.php:77). Stripe lo hace enapp/Addons/Stripe/StripeAddon.php:15, con'hooks' => ['boot' => [...]]en su manifiesto, igual que Paystack enapp/Addons/Paystack/addon.php:19. - Para recibir notificaciones, sobrescriba
receivesWebhooks(),verifyWebhook(),webhookEvent()yhandleWebhook()(app/Support/Integrations/IntegrationDriver.php:121-171). Vea Webhooks.