WP Manifestindependent plugin directory
manifest / ecommerce / user-installments-manager

مدیریت اقساط کاربران + زرین‌پال

Custom WordPress plugin for managing user installment payments (plans, due dates, and admin panel).

by Ghazale · github.com/blindmagnet/user-installments-manager · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/blindmagnet/user-installments-manager/archive/refs/heads/main.zip

A WordPress plugin for managing user installment payments — with ZarinPal online payment gateway, Kavenegar SMS notifications, daily cron reminders, and a customer-facing shortcode view.

افزونه مدیریت اقساط کاربران با درگاه پرداخت زرین‌پال، پیامک کاوه‌نگار، یادآور روزانه خودکار و نمایش پنل کاربری از طریق شورت‌کد.


Features / ویژگی‌ها

  • Admin Installment Management — Create, edit, and delete installments per user from the WP admin
  • User Column in Admin — Quick installment count visible directly in the Users list table
  • Online Payment (ZarinPal) — Customers pay installments online; authority and ref ID stored per record
  • SMS Notifications (Kavenegar) — SMS sent on new installment creation and successful payment
  • Daily Reminders (WP-Cron) — Automated daily email + SMS reminders for installments due the next day
  • Customer Shortcode[user_installments] renders a full payment dashboard for logged-in users
  • Jalali Date Support — Built-in Gregorian→Jalali converter; compatible with Parsidate and jDate plugins
  • Notification Log — Full audit trail of all emails and SMS messages sent, viewable in admin
  • DB Version Management — Auto-migration on plugin update via version comparison

Shortcode

[user_installments]

Place on any page. Shows the logged-in user's installments with status and online payment button. Unauthenticated users see a login prompt.


Installation

  1. Upload the user-installments-manager folder to /wp-content/plugins/
  2. Activate the plugin from Plugins → Installed Plugins
  3. Go to اقساط → تنظیمات and enter your ZarinPal Merchant ID and Kavenegar API Key
  4. Add [user_installments] to the page where customers should see their installments

Configuration

All credentials are stored in WordPress options — never hardcoded. Configure from:

WordPress Admin → اقساط → تنظیمات

Setting Description
ZarinPal Merchant ID Your merchant UUID from the ZarinPal panel
Sandbox mode Enable for testing without real transactions
Kavenegar API Key Your API key from panel.kavenegar.com
Kavenegar Sender Your dedicated SMS line number
Daily reminder time Time of day for automated cron reminders

Database Schema

One table: wp_user_installments

Column Type Description
id BIGINT Primary key
user_id BIGINT WordPress user ID
title VARCHAR(255) Installment label
amount DECIMAL(15,2) Amount in Tomans
due_date DATE Payment due date
status VARCHAR(20) pending / paid
zarinpal_authority VARCHAR(100) ZarinPal authority token
zarinpal_ref_id VARCHAR(100) ZarinPal reference ID after payment
paid_at DATETIME Timestamp of successful payment

AJAX Actions

Action Access Description
add_installment Admin Add a new installment for a user
delete_installment Admin Remove an installment record
mark_as_paid Admin Manually mark an installment as paid

All actions protected with WordPress nonces.


Payment Flow

Customer clicks Pay
       ↓
ZarinPal request → authority stored in DB
       ↓
Redirect to ZarinPal payment page
       ↓
Callback to site → verify transaction
       ↓
Status updated to "paid" + ref_id stored
       ↓
SMS confirmation sent via Kavenegar

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • cURL extension
  • Kavenegar PHP SDK (included in /kavenegar/)

Changelog

1.1.0

  • ZarinPal payment gateway integration
  • Kavenegar SMS on payment confirmation
  • Daily cron reminder system
  • Notification log viewer in admin
  • DB version auto-migration

1.0.0

  • Initial release: installment CRUD, user column, shortcode, email notifications

License

Licensed under GPLv2 or later.


Author

Ghazale — Freelance WordPress & WooCommerce Developer
GitHub