@extends('layouts.app') @section('title', 'MPESA Configuration') @section('style') @endsection @section('content')
@if($activeCredential)
Active Credential
{{ $activeCredential->name }} ({{ $activeCredential->environment_display }})
@if($activeCredential->last_success) Last successful connection: {{ $activeCredential->last_success->diffForHumans() }} @endif
@else
Warning: No Active Credentials
MPESA payments will not work until you activate credentials.
@endif
Configured Credentials
@if($credentials->count() > 0)
@foreach($credentials as $credential)
{{ $credential->name }} @if($credential->is_active) Active @endif
{{ $credential->shortcode_masked }} {{ $credential->environment_display }} @if($credential->urls_registered_at) URLs Registered @endif
@if($credential->notes)

{{ $credential->notes }}

@endif
@if($credential->last_success) Last success: {{ $credential->last_success->diffForHumans() }} @endif @if($credential->last_failure) Last failure: {{ $credential->last_failure->diffForHumans() }} @endif
@if(!$credential->is_active) @endif @if($credentials->count() > 1) @endif
@endforeach
@else
No credentials configured

Add your first MPESA credentials to get started

@endif
Important Notes

  • Only one credential can be active at a time
  • Make sure callback URLs are publicly accessible
  • Test credentials in sandbox environment first
  • Keep your credentials secure and never share them
  • URLs must be registered for C2B payments to work
Add New Credentials

@csrf
e.g., "Production", "Sandbox Test"
Your MPESA Paybill/Till number
From Safaricom Daraja portal
From Safaricom Daraja portal
Your MPESA passkey for STK Push
For B2C and reversal transactions
Password for initiator
Encrypted security credential
Only one credential can be active at a time
For STK Push and C2B callbacks
For C2B validation (optional)
For C2B confirmation (optional)
Any additional notes about these credentials
Connection Test Results

@endsection @section('script') @endsection