Operational Integrations – Third-Party Services and Credentials
This section details the centralized configuration for all external services used by the Prep Network Events platform. All credentials and endpoints are managed via environment variables in config/services.php and, for Sentry, in config/sentry.php. This approach ensures secure, flexible access to:
- Google Maps & ReCAPTCHA
- Mailgun & SparkPost
- Stripe (Checkout & Webhooks)
- Twilio (Notify & Messaging)
- PN Data API
- Vertical Insurance API
- WordPress Integration
- Shopify Partners (VKTRY, MOOLAH)
- Event Connect API
- Sentry Error Tracking
Configuration File Overview
Laravel consolidates service credentials in config/services.php, mapping each service to its environment variables. Sensitive keys never live in code; they load at runtime via env().
// config/services.php
return [
'google' => [
'map_key' => env('GOOGLE_MAPS_API_KEY'),
'recaptcha_site' => env('GOOGLE_RECAPTCHA_SITE_KEY'),
'recaptcha_secret'=> env('GOOGLE_RECAPTCHA_SECRET_KEY'),
],
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\Models\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'webhook' => [
'secret' => env('STRIPE_PAYMENT_WEBHOOK_SECRET'),
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
],
'payment_method_configuration' => env('STRIPE_PAYMENT_METHOD_CONFIGURATION'),
],
'twilio' => [
'account' => env('TWILIO_ACCOUNT_SID'),
'token' => env('TWILIO_AUTH_TOKEN'),
'from' => env('TWILIO_FROM'),
'message_service' => env('TWILIO_MESSAGE_SERVICE'),
'notify' => env('TWILIO_NOTIFY_SID'),
'test_phone' => env('TWILIO_TEST_PHONE', '1111111111'),
],
'pn_data' => [
'url' => env('APP_ENV') === 'production'
? 'https://data.prepnetwork.com/api'
: env('PN_DATA_URL', 'https://data-staging.prepnetwork.com/api'),
'token' => env('PN_DATA_TOKEN'),
],
'vertical_insurance' => [
'client_id' => env('VI_ID'),
'client_secret' => env('VI_SECRET'),
'stripe_connected_account' => env('VI_STRIPE_CONNECTED_ACCOUNT'),
],
'wordpress' => [
'env' => env('WORDPRESS_ENV', env('APP_ENV')),
'user' => env('WORDPRESS_USER'),
'password' => env('WORDPRESS_PASSWORD'),
],
'shopify' => [
'VKTRY' => [
'url' => env('VKTRY_URL'),
'api_key' => env('VKTRY_KEY'),
],
'MOOLAH'=> [
'url' => env('MOOLAH_URL'),
'api_key' => env('MOOLAH_KEY'),
],
],
'event_connect' => [
'token' => env('EVENT_CONNECT_TOKEN'),
],
'sentry' => [
'api_key' => env('SENTRY_API_KEY'),
],
];
📍 Google Maps & ReCAPTCHA
Laravel uses the google key group for geolocation and bot protection.
| Environment Variable | Purpose |
|---|---|
| GOOGLE_MAPS_API_KEY | JavaScript & Static Maps API Key |
| GOOGLE_RECAPTCHA_SITE_KEY | ReCAPTCHA v2/v3 Site Key |
| GOOGLE_RECAPTCHA_SECRET_KEY | ReCAPTCHA Secret Validation Key |
These variables power map displays in Blade views and validate registration forms.
✉️ Mailgun & SparkPost
Transactional email is routed through Mailgun or SparkPost, based on the MAIL_MAILER setting.
Mailgun configuration:
| Env Var | Description |
|---|---|
| MAILGUN_DOMAIN | Mailgun sending domain |
| MAILGUN_SECRET | API secret key |
| MAILGUN_ENDPOINT | API endpoint (default: api.mailgun.net) |
SparkPost configuration:
| Env Var | Description |
|---|---|
| SPARKPOST_SECRET | API key for SparkPost |
Mail classes use Mail::mailer('mailgun') or Mail::mailer('sparkpost') under the hood.
💳 Stripe Checkout & Webhooks
Stripe powers payments and subscriptions.
| Env Var | Description |
|---|---|
| STRIPE_KEY | Publishable API key |
| STRIPE_SECRET | Secret API key |
| STRIPE_PAYMENT_WEBHOOK_SECRET | Webhook signature secret |
| STRIPE_WEBHOOK_TOLERANCE | Maximum tolerance for webhook timestamp |
| STRIPE_PAYMENT_METHOD_CONFIGURATION | Configure available payment methods |
Example usage in checkout service:
Stripe::setApiKey(config('services.stripe.secret'));
Session::create([
'payment_method_configuration' => config('services.stripe.payment_method_configuration'),
// ...
]);
✉️ Twilio Notify & Messaging
The platform sends SMS via two Twilio channels: Notify and direct SMS.
| Env Var | Purpose |
|---|---|
| TWILIO_ACCOUNT_SID | Twilio Account SID |
| TWILIO_AUTH_TOKEN | Twilio Auth Token |
| TWILIO_FROM | Default SMS sender number |
| TWILIO_MESSAGE_SERVICE | Messaging Service SID |
| TWILIO_NOTIFY_SID | Notify Service SID |
| TWILIO_TEST_PHONE | Fallback number for non-production |
Code integration:
- SendTextingCampaignTrait uses
Twilio\Rest\Client(config('services.twilio.account'), config('services.twilio.token')) - TwilioWebhookController verifies webhooks using
Config::get('services.twilio.notify').
🗄️ PN Data API
Event data synchronization relies on the PN Data service.
| Env Var | Description |
|---|---|
| PN_DATA_URL | Custom staging or production endpoint |
| PN_DATA_TOKEN | Bearer token for API authorization |
Services route API calls through Http::withToken(config('services.pn_data.token'))->get(config('services.pn_data.url').'/...').
🔒 Vertical Insurance
Players and teams can purchase insurance add-ons via the Vertical Insurance API.
| Env Var | Description |
|---|---|
| VI_ID | API client identifier |
| VI_SECRET | API client secret |
| VI_STRIPE_CONNECTED_ACCOUNT | Connected Stripe account for charge splitting |
The VerticalInsurance handler fetches quotes, clones payment methods, and creates downstream Stripe payments .
🌐 WordPress Integration
Authentication to external WordPress sites uses:
| Env Var | Description |
|---|---|
| WORDPRESS_ENV | Target environment |
| WORDPRESS_USER | API user |
| WORDPRESS_PASSWORD | API password |
These values feed custom integrations to publish or fetch event content.
🛒 Shopify (VKTRY & MOOLAH)
Commands place partner orders via Shopify or Moolah endpoints.
| Env Var | Description |
|---|---|
| VKTRY_URL | VKTRY API base URL |
| VKTRY_KEY | VKTRY API key |
| MOOLAH_URL | Moolah partner API endpoint |
| MOOLAH_KEY | Moolah API key |
The app:place_shopify_orders command instantiates new Shopify and new Moolah with these credentials .
🔗 Event Connect
Event syncing with third-party calendars uses:
| Env Var | Description |
|---|---|
| EVENT_CONNECT_TOKEN | Bearer token for API |
Integrations read this token in config('services.event_connect.token') before invoking external endpoints.
🐞 Sentry Error Tracking
Production errors are captured via Sentry.
-
config/sentry.php loads DSN and options:
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')), 'environment' => env('SENTRY_ENVIRONMENT'), 'traces_sample_rate'=> floatval(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)), -
config/services.php also maps a generic
SENTRY_API_KEYentry.
Application exceptions and performance traces use these environment values to report events.
{
"title": "Secure Your Keys",
"content": "Never commit environment variables. Use a secrets manager for production .env files."
}
All third-party credentials must be defined in your .env file before deployment. Relying on centralized configuration ensures clear visibility and easy rotation of keys across multiple environments.