Payment Gateway Issues
استكشاف الأخطاء Stripe and PayPal integration problems.
General Checks
- API Keys -- Verify keys in
Admin > الإعدادات > Paymentsare correct - Webhook URL -- Must be
https://yourdomain.com/webhooks/stripe(or/webhooks/paypal) - Webhook Secret -- Must match what's in the Stripe/PayPal dashboard
- SSL -- Payment webhooks require HTTPS
- CSRF -- Webhook routes are CSRF-exempt (configured in
routes/web.php)
Stripe Issues
Checkout Not Redirecting
- Check
STRIPE_PUBLISHABLE_KEYandSTRIPE_SECRET_KEYare correct - Ensure you're using live keys for production (not
pk_test_/sk_test_) - Check browser console for JavaScript errors
Webhook Signature Verification Failed
- The
STRIPE_WEBHOOK_SECRETmust match the signing secret from Stripe dashboard - الويب هوك must come from Stripe's IPs -- don't put a firewall in front
Subscription Not Activating
- Check
Admin > Paymentsfor webhook events - Verify the
checkout.session.completedevent is being received - Check
storage/logs/laravel.logfor errors
Plan Prices Not Matching
- Ensure the Stripe Price IDs in
Admin > Plansmatch your Stripe dashboard prices - Both monthly and annual prices need separate Price IDs
PayPal Issues
Sandbox vs. Live
- Check
PAYPAL_MODEin.env--sandboxfor testing,livefor production - Use sandbox credentials for testing, live credentials for production
Subscription Not Activating
- Check webhook events in
Admin > Payments - Verify
PAYPAL_WEBHOOK_IDmatches your PayPal webhook configuration - Check
storage/logs/laravel.logfor errors
Checking Payment Events
اذهب إلى Admin > Payments to see all webhook events received from بوابات الدفع. Each event shows:
- Whether it was processed successfully
- Any processing errors
- The raw payload (for debugging)