WooCommerce Moadian Connector
اتصال فروشگاه ووکامرس به سامانه مودیان مالیاتی ایران
by Shahin Ilderemi · github.com/ildrm/wc-moadian-connector · website
★ 4stars
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/ildrm/wc-moadian-connector/archive/refs/heads/main.zipFrom the readme
WooCommerce Moadian Connector
WordPress/WooCommerce integration for the Iranian Tax Organization's no-certificate self-TSP protocol described in the supplied .NET SDK guide.
What it does
- Queues a fiscal invoice when a WooCommerce order becomes completed.
- Builds the documented INVOICE.V01 header/body structure from order-time values.
- Generates the fiscal tax ID and invoice serial required by Moadian.
- Signs requests with RSA-SHA256 and encrypts invoice packets with RSA-OAEP-256 plus AES-256-GCM.
- Retrieves and caches access tokens using GETTOKEN.
- Retrieves the Tax Organization encryption key with GETSERVERINFORMATION when it is not configured manually.
- Stores the returned UID/reference number, then polls INQUIRYBYREFERENCENUMBER until Moadian confirms or rejects the invoice.
- Uses WooCommerce CRUD APIs, including HPOS-compatible order metadata access.
- Encrypts the private key at rest with authenticated AES-256-GCM.
See Protocol coverage for the feature-by-feature comparison and known gaps.
Requirements
- WordPress 5.6+
- WooCommerce 8.0+
- PHP 7.4+
- PHP OpenSSL extension
- Action Scheduler (bundled with WooCommerce) or working WP-Cron
Configuration
Open Setti