Title: SELFiT Payment Gateway for WooCommerce
Author: selfit
Published: <strong>2025 年 12 月 2 日</strong>
Last modified: 2026 年 8 月 11 日

---

搜索插件

![](https://ps.w.org/selfit/assets/icon-128x128.png?rev=3407665)

# SELFiT Payment Gateway for WooCommerce

 作者：[selfit](https://profiles.wordpress.org/selfit/)

[下载](https://downloads.wordpress.org/plugin/selfit.1.0.8.zip)

 * [详情](https://cn.wordpress.org/plugins/selfit/#description)
 * [评价](https://cn.wordpress.org/plugins/selfit/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/selfit/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/selfit/#developers)

 [支持](https://wordpress.org/support/plugin/selfit/)

## 描述

This plugin connects your WooCommerce store to SELFiT and lets customers pay securely
via the SELFiT wallet.
 If you are upgrading from a previous version, please read
the Upgrade Notice.

**Highlights**
 – Direct integration with the SELFiT API to create secure payment
links – Compatible with WooCommerce (min 5.0), tested up to 10.0 – HPOS-ready (High-
Performance Order Storage) – Full refund from the WooCommerce order screen – Auto-
detects the billing phone; optionally reads Digits plugin fields if present – Optional
request/error logging in a dedicated “SELFiT Logs” admin page – Supports IRR/Toman(
auto-converts IRR by dividing by 10)

**Requirements**
 – WordPress 5.0+ (tested up to 7.0) – WooCommerce 5.0+ (tested
up to 10.0) – PHP 7.4+ – A SELFiT merchant account and API credentials

#### External services

This plugin uses an API to connect to the payment gateway. This connection is required
to perform the transaction.
 The information sent via the API is derived from the
order details, including: * Item name, price and quantity * Shipping method * buyer’s
information (Name and phone number) For more detailed description about how Selfit
API works, please visit **[Selfit Terms of Use](https://selfit.ir/about)**.

### Privacy

To create and verify payments, the plugin sends the following to `api.selfit.ir`:
–
Customer phone number (to validate SELFiT user existence) – Order ID, amount, and
optionally line items (as metadata)

If **logging** is enabled, limited request/response data are stored in the database
for troubleshooting. Store owners are responsible for informing users according 
to their local privacy laws.

### Notes for Developers

 * Gateway ID: `selfit`
 * Internal confirmation endpoint: `woocommerce_api_wc_selfit_gateway`
 * Important hooks: `woocommerce_order_status_cancelled`, `woocommerce_order_status_refunded`
 * HPOS compatibility declared with `FeaturesUtil::declare_compatibility('custom_order_tables',...)`
 * Log table: `{prefix}selfit_debug_logs`

### Support

For support or merchant onboarding, please contact: https://selfit.ir

## 安装

 1. Upload the plugin folder to `/wp-content/plugins/` or upload the ZIP via **Plugins
    Add New**.
 2. Activate the plugin.
 3. Go to **WooCommerce  Settings  Payments** and enable **SELFiT**.
 4. Open the gateway settings and enter your **API Username** and **Password**. Save
    to authenticate and receive tokens.
 5. (Optional) Enable request/error logging for troubleshooting.
 6. Set your store currency (IRR or Toman). In IRR mode, amounts are automatically 
    divided by 10 before sending to SELFiT.

## 常见问题

### The gateway doesn’t appear on checkout

 * Make sure WooCommerce is active.
 * Enter and save your SELFiT API credentials so the plugin can authenticate.
 * A valid customer phone number is required. The plugin uses `billing_phone` (and
   Digits fields if Digits is installed).
 * If the SELFiT user doesn’t exist, the gateway may be hidden.

### Do you support Toman?

Yes. If your store uses **IRR (Rial)**, the amount sent to SELFiT is automatically
divided by 10. If you use **Toman**, the amount is sent as-is.

### Can I refund from WooCommerce?

Yes. Use a **Full Refund** from the order screen; the plugin will submit a refund
request to SELFiT and log the result.

### How is the callback URL configured?

The plugin automatically generates the return URL based on the internal WooCommerce
endpoint and sends it to the API.

### Where can I see logs?

Go to **WooCommerce  SELFiT Logs**.

## 评价

此插件暂无评价。

## 贡献者及开发者

「SELFiT Payment Gateway for WooCommerce」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ selfit ](https://profiles.wordpress.org/selfit/)
 *   [ AbdiScript ](https://profiles.wordpress.org/abdiscript/)

[帮助将「SELFiT Payment Gateway for WooCommerce」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/selfit)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/selfit/)，查看[SVN仓库](https://plugins.svn.wordpress.org/selfit/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/selfit/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/selfit/)。

## 更新日志

#### 1.0.8

 * On checkout the gateway is shown only when the customer mobile number is resolved
   and confirmed as registered in SELFiT; outside customer payment contexts (accounting
   integrations, REST, cron, admin) the gateway stays discoverable
 * Fixed: the mobile number typed in the checkout form now always takes priority;
   previously a stale session/profile number kept being sent to the API
 * New optional setting: a custom user meta key to read the customer mobile number
   from, for sites that do not use Digits
 * Removed persistent caching of the user-existence check; every availability check
   now queries the SELFiT API live
 * Payment link errors returned by the SELFiT API are now shown to the customer 
   instead of a generic message

#### 1.0.7

 * Improved payment gateway availability handling for third-party integrations, 
   accounting plugins, background jobs, REST requests, and admin contexts
 * Customer eligibility checks are now limited to customer-facing payment contexts
   such as cart, checkout, checkout AJAX, and pay-for-order flows
 * SELFiT remains discoverable by WooCommerce integrations outside checkout when
   the gateway is enabled and configured
 * Existing checkout behavior is preserved: the gateway is still hidden when the
   customer phone number is invalid or the customer is not registered in SELFiT
 * Payment-time user validation remains in place as an additional safeguard before
   creating a SELFiT payment

#### 1.0.6

 * Refund amounts are now always sent to SELFiT in Toman (IRR is auto-converted),
   consistent with payments
 * Detailed per-item refund status (refunded/remaining totals) is sent with partial
   refunds
 * User-existence check cache reduced from 15 minutes to 1 minute
 * Token expiry and log dates are now displayed in the Jalali (Shamsi) calendar

#### 1.0.5

 * «Partial Refund» problem fixed!

#### 1.0.0

 * Initial release

## 额外信息

 *  版本 **1.0.8**
 *  最后更新：**3 月前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **7.0.8**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/selfit/)
 * 标签
 * [gateway](https://cn.wordpress.org/plugins/tags/gateway/)[Iran](https://cn.wordpress.org/plugins/tags/iran/)
   [payment](https://cn.wordpress.org/plugins/tags/payment/)[toman](https://cn.wordpress.org/plugins/tags/toman/)
   [woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/selfit/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/selfit/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/selfit/reviews/)

## 贡献者

 *   [ selfit ](https://profiles.wordpress.org/selfit/)
 *   [ AbdiScript ](https://profiles.wordpress.org/abdiscript/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/selfit/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://selfit.ir)