{% extends 'base.html' %} {% block title %}M-Pesa Configuration{% endblock %} {% block content %}

M-Pesa Configuration

← Back to Dashboard
Configuration Settings
{% csrf_token %}
{{ form.environment }} {% if form.environment.help_text %} {{ form.environment.help_text }} {% endif %} {% if form.environment.errors %}
{{ form.environment.errors.0 }}
{% endif %}
{{ form.business_short_code }} {% if form.business_short_code.help_text %} {{ form.business_short_code.help_text }} {% endif %} {% if form.business_short_code.errors %}
{{ form.business_short_code.errors.0 }}
{% endif %}
{{ form.consumer_key }} {% if form.consumer_key.help_text %} {{ form.consumer_key.help_text }} {% endif %} {% if form.consumer_key.errors %}
{{ form.consumer_key.errors.0 }}
{% endif %}
{{ form.consumer_secret }} {% if form.consumer_secret.help_text %} {{ form.consumer_secret.help_text }} {% endif %} {% if form.consumer_secret.errors %}
{{ form.consumer_secret.errors.0 }}
{% endif %}
{{ form.passkey }} {% if form.passkey.help_text %} {{ form.passkey.help_text }} {% endif %} {% if form.passkey.errors %}
{{ form.passkey.errors.0 }}
{% endif %}
{{ form.validation_url }} {% if form.validation_url.help_text %} {{ form.validation_url.help_text }} {% endif %} {% if form.validation_url.errors %}
{{ form.validation_url.errors.0 }}
{% endif %}
{{ form.confirmation_url }} {% if form.confirmation_url.help_text %} {{ form.confirmation_url.help_text }} {% endif %} {% if form.confirmation_url.errors %}
{{ form.confirmation_url.errors.0 }}
{% endif %}
{{ form.response_type }} {% if form.response_type.help_text %} {{ form.response_type.help_text }} {% endif %} {% if form.response_type.errors %}
{{ form.response_type.errors.0 }}
{% endif %}
Setup Instructions
â„šī¸ Setup Steps
  1. Get your credentials from M-Pesa Developer Portal
  2. Configure your callback URLs
  3. Test in sandbox environment first
  4. Switch to production when ready
{% if config %}
✓ Current Status

Environment: {{ config.get_environment_display }}

Short Code: {{ config.business_short_code }}

Status: {% if config.is_active %} Active {% else %} Inactive {% endif %}

{% endif %}
âš ī¸ Important

Make sure your callback URLs are publicly accessible and use HTTPS in production. The system will automatically register these URLs with M-Pesa when you save.

{% endblock %}