Webknit Payment Gateway for Fonepay

By Webknit Digital

★ 5.0/5 (1 ratings)0+ active installationsVersion 1.0.2

Accept Fonepay payments in WooCommerce, on both the classic checkout and the block-based Cart/Checkout.

Description

Accept Fonepay in WooCommerce

This plugin adds Fonepay as a payment method at checkout, supporting both the classic (shortcode) checkout and the WooCommerce Cart/Checkout blocks.

Please note that WooCommerce must be installed and active.

Introduction

Fonepay is a Nepali digital payment portal developed by F1Soft. Since Fonepay only settles in NPR, this plugin only makes sense for stores that accept payment in Nepalese Rupees.

This plugin was developed independently and has no affiliation with F1Soft.

Questions?

Reach out to Webknit Digital at webknitdigital.com.

External services

This plugin connects to Fonepay’s payment API to process checkout payments.

At checkout, when a customer chooses Fonepay, the order amount, order reference, merchant code, and signature are sent to Fonepay’s request endpoint and the customer is redirected there to complete payment. After payment, Fonepay redirects the customer’s browser back to this site with the payment result, which the plugin verifies to confirm the order.

This service is provided by Fonepay (F1Soft International): terms of service, privacy policy.

Installation

Minimum Requirements

  • PHP 7.4 or greater.
  • WordPress 6.0 or greater.
  • WooCommerce 7.0 or greater.

Automatic installation

Search for “Webknit Payment Gateway for Fonepay” under Plugins > Add New and install it directly.

Manual installation

Upload the plugin zip through Plugins > Add New > Upload Plugin, or extract it into your wp-content/plugins directory directly, then activate through the “Plugins” screen.

FAQ

What is needed to use this plugin?

See Minimum Requirements above. You’ll also need a Merchant Code and Merchant Secret from Fonepay.

Does this work with the block-based checkout?

Yes. Fonepay registers as a payment method for both the classic (shortcode) checkout and the WooCommerce Cart/Checkout blocks.

Which currencies does Fonepay support?

Fonepay only settles in NPR. The gateway automatically hides itself at checkout whenever the store or order currency isn’t NPR – there’s nothing to configure manually.

I don’t see the Fonepay payment option during checkout?

Check that your store (or the order’s) currency is set to NPR – Fonepay only appears at checkout for NPR orders. Also confirm your Merchant Code and Merchant Secret are entered under WooCommerce > Settings > Payments > Fonepay.

The order was paid and shows “processing” instead of “completed” – is that right?

Yes, this is expected behavior. All payment gateways in WooCommerce must change the order status to “processing” when payment is confirmed, and should only move to “completed” once the order has actually been fulfilled/delivered.

For downloadable products, WooCommerce’s default setting only grants access once the order is “completed”. You can enable “Grant access to download the product after payment” under WooCommerce > Settings > Products to release downloads as soon as the order is “processing”.

Customers see “We could not verify your Fonepay payment” even though my Merchant Code and Secret are correct.

The order is left unchanged and a note is added to it. Please contact Fonepay support to confirm your Merchant Code and Secret are correct, and that you’re using the matching sandbox or live credentials for your current mode.

I get an error saying activation was blocked, or a warning notice, because of “another Fonepay payment gateway plugin”

This happens if another Fonepay gateway plugin is also active – both plugins register the same WooCommerce gateway id and payment callback URL, so running them together would cause payment failures. Deactivate one of the two plugins yourself (this plugin never deactivates another plugin for you). If you’re migrating from the other plugin, your existing settings (Merchant Code/Secret, etc.) carry over automatically once you deactivate it and activate this one, since both use the same settings storage.

Where can I report bugs or get support?

Contact Webknit Digital at webknitdigital.com to report bugs or ask questions.

Paid support is also available for setup, customization, integration, testing, and deployment, on a one-off or retainer basis.

Screenshots

Changelog

1.0.2

  • Fix: Fonepay Transactions report showed only the first 10 orders; it now pages through all of them.
  • Fix: “Number of transactions per page” setting now saves.
  • Fix: report search is kept when changing page or sorting.
  • Fix: sorting the report by amount now uses the full amount, including decimals.
  • Fix: WooCommerce notice when viewing a Fonepay order.
  • Improved: failed or cancelled payments return to checkout with a notice, and the cart is kept.
  • Improved: incomplete payment returns show a friendly message instead of an error page.
  • Improved: merchant secrets are masked in settings, with a show/hide button.

1.0.1

  • Fix: blank page when returning to an already paid order.
  • Fix: payment error when an ordered product has been deleted.
  • Fix: failed or cancelled results no longer change a paid order.
  • Improved: customer-friendly message when a payment can’t be verified.
  • Improved: cancelled payments return to the cart with a notice.
  • Improved: Fonepay stays hidden at checkout until credentials for the current mode are set.
  • Improved: credentials for the selected mode are required in settings.
  • Improved: order number is used as the payment remark when product names can’t be sent.
  • Improved: site URL sent to Fonepay is limited to 50 characters.
  • Changed: new installs start with Fonepay disabled.
  • Changed: logs are no longer deleted when settings are saved.

1.0.0

  • 1st release