{"id":307574,"date":"2026-06-12T20:45:48","date_gmt":"2026-06-12T20:45:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/thawani-payment-gateway-for-woocommerce\/"},"modified":"2026-06-12T20:45:30","modified_gmt":"2026-06-12T20:45:30","slug":"s4d-payment-gateway-with-thawani-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/s4d-payment-gateway-with-thawani-for-woocommerce\/","author":15463485,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.4","stable_tag":"2.0.4","tested":"7.0","requires":"6.2","requires_php":"8.1","requires_plugins":null,"header_name":"S4D Payment Gateway with Thawani for WooCommerce","header_author":"The Source for Development","header_description":"Accept payments via Thawani (Visa \/ MasterCard) using API v2.","assets_banners_color":"6cc8ab","last_updated":"2026-06-12 20:45:30","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/phpawcom\/thawani-gateway-for-woocommerce","header_author_uri":"https:\/\/www.s4d.om","rating":0,"author_block_rating":0,"active_installs":0,"downloads":34,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.0.4":{"tag":"2.0.4","author":"phpawcom","date":"2026-06-12 20:45:30"}},"upgrade_notice":{"2.0.3":"<p>Renames the plugin&#039;s public constants from <code>WC_GATEWAY_THAWANI_*<\/code> to <code>THAWANI_*<\/code> (the <code>WC_<\/code> prefix is reserved by WooCommerce). If you reference these constants from third-party code, update the names.<\/p>","2.0.2":"<p>Aligns the plugin text domain with the WordPress.org slug. Required for translation loading on WordPress.org listings.<\/p>","2.0.1":"<p>Fixes a &quot;1610 characters of unexpected output during activation&quot; warning and clears all Plugin Check findings. The legacy <code>thawani_convert_to_omr<\/code> filter is preserved via a deprecation shim; please migrate to <code>thawani_gateway_convert_to_omr<\/code>.<\/p>","2.0.0":"<p>First open-source release. Existing settings and historical data are preserved without manual migration.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3570534,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3570534,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3570534,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3570534,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3570534,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner.svg":{"filename":"banner.svg","revision":3570534,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[254339,252744,6593,266890,286],"plugin_category":[45],"plugin_contributors":[266891,266892],"plugin_business_model":[],"class_list":["post-307574","plugin","type-plugin","status-publish","hentry","plugin_tags-oman","plugin_tags-omr","plugin_tags-payment-gateway","plugin_tags-thawani","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-phpawcom","plugin_contributors-s4d","plugin_committers-phpawcom"],"banners":{"banner":"https:\/\/ps.w.org\/s4d-payment-gateway-with-thawani-for-woocommerce\/assets\/banner-772x250.png?rev=3570534","banner_2x":"https:\/\/ps.w.org\/s4d-payment-gateway-with-thawani-for-woocommerce\/assets\/banner-1544x500.png?rev=3570534","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/s4d-payment-gateway-with-thawani-for-woocommerce\/assets\/icon.svg?rev=3570534","icon":"https:\/\/ps.w.org\/s4d-payment-gateway-with-thawani-for-woocommerce\/assets\/icon.svg?rev=3570534","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Originally a paid plugin developed by The Source for Development (https:\/\/www.s4d.om), rewritten with Claude Code and released as open source.<\/p>\n\n<p>Features:<\/p>\n\n<ul>\n<li>Hosted Thawani checkout \u2014 customers redirect to Thawani's secure checkout page; PCI scope stays with Thawani.<\/li>\n<li>Saved cards \u2014 logged-in customers can tokenize cards on Thawani and reuse them at checkout.<\/li>\n<li>Refunds \u2014 full refunds from the WooCommerce admin (Thawani does not support partial refunds).<\/li>\n<li>Webhooks \u2014 optional server-to-server endpoint so payment status syncs even if the customer closes the page before redirect. Optional HMAC-SHA256 signature verification.<\/li>\n<li>WooCommerce Blocks support and HPOS compatibility.<\/li>\n<li>Currency conversion hook (thawani_gateway_convert_to_omr) for non-OMR stores.<\/li>\n<\/ul>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to Thawani Pay, the payment gateway operated by Thawani Technologies LLC (https:\/\/thawani.om), to process card payments for your WooCommerce store. Using this plugin requires a Thawani merchant account and API keys, which you enter in the gateway settings. Thawani is a third-party service and is not affiliated with this plugin's authors.<\/p>\n\n<p>The plugin communicates with Thawani's API endpoints (<code>https:\/\/checkout.thawani.om<\/code> in live mode and <code>https:\/\/uatcheckout.thawani.om<\/code> in test mode) in the following situations:<\/p>\n\n<ul>\n<li>When a customer places an order with this gateway, a checkout session or payment intent is created. The data sent includes the order amount and currency, product\/line-item names, a client reference derived from the order ID, and your merchant API key (sent as a request header). The customer is then redirected to Thawani's hosted checkout page to enter their card details \u2014 no card data is handled or stored by your site.<\/li>\n<li>When a logged-in customer reuses or deletes a saved card, the plugin creates\/retrieves a Thawani customer record and its stored payment methods. The data sent is a customer identifier and your merchant API key.<\/li>\n<li>When a store administrator issues a refund, the plugin looks up the payment and sends a refund request containing the payment ID, amount, and reason.<\/li>\n<li>If you configure the optional webhook, Thawani sends payment-status notifications back to your site, which the plugin verifies (optionally via HMAC-SHA256) and uses to update the order.<\/li>\n<\/ul>\n\n<p>No data is sent to Thawani except as part of these payment operations.<\/p>\n\n<ul>\n<li>Thawani Terms and Conditions: https:\/\/thawani.om\/terms\/<\/li>\n<li>Thawani Privacy Policy: https:\/\/thawani.om\/privacy-policy-2\/<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to \/wp-content\/plugins\/ or install via the Plugins screen.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to WooCommerce &gt; Settings &gt; Payments &gt; Thawani Gateway and enter your Thawani API keys.<\/li>\n<li>(Optional) Copy the Webhook URL shown in the settings into your Thawani portal under Webhooks.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20thawani%20support%20partial%20refunds%3F\"><h3>Does Thawani support partial refunds?<\/h3><\/dt>\n<dd><p>No. Refund attempts that don't match the order total are rejected with a clear error.<\/p><\/dd>\n<dt id=\"will%20my%20legacy%20settings%20carry%20over%3F\"><h3>Will my legacy settings carry over?<\/h3><\/dt>\n<dd><p>Yes. The settings option key (woocommerce_thawani_settings) and the legacy mapping table ({prefix}thawani_invoice_map) are preserved.<\/p><\/dd>\n<dt id=\"how%20do%20i%20test%3F\"><h3>How do I test?<\/h3><\/dt>\n<dd><p>Enable Test mode in the gateway settings. The form ships with public Thawani UAT credentials.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.4<\/h4>\n\n<ul>\n<li>Removed the remote jQuery Confirm script\/stylesheet loaded from cdnjs.cloudflare.com; the saved-card delete confirmation now uses a native browser dialog so no external assets are requested.<\/li>\n<li>Webhook payloads decoded from the request body are now recursively sanitized before being logged or written to order meta.<\/li>\n<li>Documented the Thawani external service in the readme, including Terms of Service and Privacy Policy links.<\/li>\n<li>Added the <code>Requires Plugins: woocommerce<\/code> header and an <code>ABSPATH<\/code> guard to the blocks asset manifest.<\/li>\n<\/ul>\n\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>Renamed plugin constants from <code>WC_GATEWAY_THAWANI_*<\/code> to <code>THAWANI_*<\/code> to clear Plugin Check warnings about the WooCommerce-reserved <code>WC_<\/code> prefix.<\/li>\n<li>Added a <code>phpcs.xml.dist<\/code> declaring the plugin's accepted prefixes and text domain so coding-standard scans recognize correctly-prefixed hooks.<\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Aligned the plugin's text domain with the WordPress.org slug <code>thawani-payment-gateway-for-woocommerce<\/code>. Translation files have been renamed accordingly.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Activation no longer emits \"unexpected output\" warnings; the invoice-map table is now created via a direct query that bypasses dbDelta's reserved-word column parser.<\/li>\n<li>Plugin Check findings addressed: removed the discouraged <code>load_plugin_textdomain()<\/code> call (WP auto-loads bundled translations), tightened input casts at checkout and in the saved-card AJAX handler, and prefixed the currency conversion filter as <code>thawani_gateway_convert_to_omr<\/code> (the legacy <code>thawani_convert_to_omr<\/code> continues to work via <code>apply_filters_deprecated<\/code>).<\/li>\n<li>Bumped tested-up-to header to WordPress 6.9.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>First open-source release. Rewrite of the paid plugin against Thawani's v1 API.<\/li>\n<li>Refunds now resolve the real payment_id via GET \/payments before calling \/refunds.<\/li>\n<li>Added a server-to-server webhook endpoint with optional HMAC signature verification.<\/li>\n<li>WooCommerce Blocks and HPOS compatibility.<\/li>\n<\/ul>","raw_excerpt":"Accept Visa and MasterCard payments on WooCommerce stores via Thawani Pay.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/307574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=307574"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/phpawcom"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=307574"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=307574"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=307574"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=307574"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=307574"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=307574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}