VibeFox IntaSend for Adobe Commerce — सहायता
Requirements
Magento: Magento Open Source or Adobe Commerce 2.4.6 to 2.4.9, on your own server or hosting, on premises or on Adobe Commerce on cloud infrastructure. The module does not work with Adobe Commerce as a Cloud Service (the SaaS edition), which does not accept PHP modules.
PHP: 8.1 to 8.4, with the cURL extension.
HTTPS: IntaSend requires HTTPS for live payments and webhooks. The settings page warns you when live mode is on and the store address is not HTTPS.
IntaSend account: you need the publishable key (ISPubKey_...) and the secret key (ISSecretKey_...) of your IntaSend account, for the sandbox, for live or both, and a webhook with a challenge phrase in the IntaSend dashboard (see Configuration). The publishable key creates the checkout. The secret key is used only on your server to ask IntaSend for the payment status.
Currency: KES, USD, EUR, GBP, UGX, TZS, NGN, GHS, XAF or XOF. For other currencies the payment method is hidden.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
The module is one ZIP file. It is a Composer package and can also be copied into app/code. Run the commands in the Magento root folder as the user that owns the Magento files.
1. With Composer: put the ZIP file into a folder that your project uses as a Composer "artifact" repository and run composer require vibefox/module-intasend-payment. Without Composer: unpack the ZIP file into app/code/Vibefox/IntasendPayment/, so that registration.php is directly in that folder.
2. Run bin/magento module:enable Vibefox_IntasendPayment and bin/magento setup:upgrade. In production mode also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy, then bin/magento cache:flush.
3. In the Admin go to Stores > Configuration > Sales > Payment Methods and open VibeFox IntaSend Pay Gateway. When the Magento PayPal module is enabled, the group is listed under Other Payment Methods. Paste your VibeFox license key into License key in the license block, the first row of the group, and click Activate (see License key).
4. Paste your IntaSend sandbox and/or live keys, add the webhook in the IntaSend dashboard and enter the same challenge in the module (see Configuration). Set Enable to Yes and click Save Config. Test a payment with Test mode = Yes, then set Test mode to No to accept real payments.
The module adds the IntaSend (M-Pesa, card) payment method to the Magento checkout. It is off after installation (Enable = No). The module uses the standard Magento order states and creates no order statuses of its own. It creates two tables for the IntaSend checkout attempts and the processed IntaSend invoices.
Configuration
All settings are in Stores > Configuration > Sales > Payment Methods > VibeFox IntaSend Pay Gateway, in the standard Magento configuration form. Like other Magento settings, they can be changed for a website with the Scope switcher at the top of the page; Title and Description also for a store view. Remove data on uninstall is read from the Default Config only. Save Config saves the whole page. Amounts accept "9.99" and "9,99". Pasted keys are trimmed when you save.
If a value is wrong, Magento shows an error and nothing on the page is saved: an empty Title or a title longer than 128 characters (Enter a title for the payment method (1 to 128 characters).); a Sort order that is not a whole number ("Sort order" must be a whole number.); a Minimum order total or Maximum order total that is not a number of 0 or greater (Order total must be a number, 0 or greater.).
While Enable is Yes, the Webhook and configuration field shows warnings: Test mode: IntaSend sandbox, no real money is charged.; a problem with the keys of the current mode (for example Test mode is enabled but the sandbox publishable key or secret key is empty. or The secret key must start with ISSecretKey_.), the payment method is then hidden at checkout; No webhook challenge is configured. Webhooks will be ignored; payments are confirmed on customer return only.; The store currency is not supported by IntaSend. The payment method is hidden at checkout.; and IntaSend requires HTTPS for live payments and webhooks, but the store address is not HTTPS.
The fields are in one list. They are described below in groups.
General
Enable: turns the payment method on or off. Default: No.
Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: IntaSend (M-Pesa, card). Required, at most 128 characters.
Description: shown in the payment method list at checkout, under the payment method when the customer selects it. Default: You will be redirected to IntaSend to pay securely with M-Pesa, card or another available method.
API keys
Get the keys in the IntaSend dashboard, separately in the sandbox dashboard and in the live dashboard. Test mode uses the sandbox keys and the sandbox API, live mode uses the live keys and the live API. The module checks that the publishable key starts with ISPubKey_, the secret key with ISSecretKey_, and that the keys belong to the current mode: sandbox keys must not contain _live, live keys must not contain _test. If not, the payment method is hidden and the Webhook and configuration field explains why. Keys of the other mode are saved as they are.
Test mode: uses the IntaSend sandbox, no real money is charged. Default: Yes. Set it to No to accept real payments with the live keys. While test mode is on, the checkout shows TEST MODE - IntaSend sandbox, no real money is charged. under the payment method.
Sandbox publishable key: starts with ISPubKey_test. It identifies your business when a checkout is created.
Sandbox secret key: starts with ISSecretKey_test. Used only on your server to confirm payments with the Payment Status API.
Live publishable key: starts with ISPubKey_live.
Live secret key: starts with ISSecretKey_live. Used only on your server to confirm payments.
Magento stores the secret keys and the webhook challenge encrypted and shows only a mask after saving. As the fields say, Saved secrets are masked. Leave empty to keep; use the clear control to remove. Type a new value only to change it. The publishable keys are ordinary text fields.
Clear saved sandbox secret key, Clear saved live secret key, Clear saved webhook challenge: choose Yes and click Save Config to remove that saved secret. The control goes back to No after saving.
Webhook
The webhook tells your store that a payment has been made, even when the customer does not come back to the store (closed browser, M-Pesa confirmed later). In the IntaSend dashboard, in the sandbox and in live, add a webhook with the URL shown in the Webhook and configuration field under Webhook URL:. It is the storefront address of the default store view and looks like https://your-store/wcpintasendpay/webhook/index/. Copy the URL exactly as the settings show it. Enter a challenge phrase there and the same phrase in the module. Use one challenge for the sandbox and live.
Webhook challenge: the same challenge as in the IntaSend dashboard. Webhooks with another challenge are rejected. The challenge is read for the store where the order was placed, so enter it in the Default Config or for the website of that store. While this field is empty, webhooks are not processed and payments are confirmed only when the customer returns to the store. Such webhooks are answered as ignored, not as an error, so IntaSend does not disable the webhook before you enter the challenge.
The module reacts to these payment states reported by IntaSend. Except for the pending states, it asks the Payment Status API for the real state before changing anything, in the mode the checkout was created in:
Notifications that are not checkout payments of this store, for example payment links or send-money events of the same IntaSend account, are answered with Ignored, so IntaSend does not disable the webhook.
Conditions
Payment from applicable countries: All Allowed Countries offers the payment method for every country your store allows, Specific Countries only for the countries below.
Payment from specific countries: offer the payment method only for billing addresses in these countries.
Minimum order total: offer the payment method only from this order total, in the base currency of your store. Empty means no minimum.
Maximum order total: offer the payment method only up to this order total, in the base currency. Empty means no maximum.
Sort order: the position among the payment methods at checkout. A whole number.
Advanced
Debug log: logs checkout, return and webhook events to var/log/intasend_p_debug.log.php in the Magento folder. The file cannot be opened from the web. Errors and warnings are always logged. API keys, the challenge, customer contact data and return tokens are masked. Default: No.
Log: shows the size and the latest entries of the log. Click Clear log to empty it.
Remove data on uninstall: when Yes, uninstalling the module with its data deletes the settings and the log (see Uninstall). The license key is always removed. The tables of IntaSend checkout attempts and invoices always stay. Default: No.
Checkout
At the payment step the customer chooses the payment method (by default IntaSend (M-Pesa, card)) and sees the description and the note You will be redirected to IntaSend to complete the payment securely. After Place Order, Magento places the order in Pending Payment. No invoice is created and no order e-mail is sent yet. The module then creates an IntaSend checkout for the order total in the order currency and sends the customer to the IntaSend hosted checkout. There the customer pays with M-Pesa, a card or another method enabled on your IntaSend account. The customer's e-mail and the name, address, phone and country of the billing address are passed to IntaSend when they match the IntaSend field rules. Empty or unsuitable fields are left out.
After paying, the customer returns to your store. The order is marked paid only after IntaSend confirms it: the module asks the Payment Status API when the customer returns and when the webhook arrives. A return and a webhook arriving at the same moment are handled one after the other, so the order is never invoiced twice. When the payment is confirmed, Magento creates the invoice with the IntaSend invoice ID as the transaction ID and sends the order e-mail, and the customer sees the standard order success page. If the order was put on hold, the success page shows Your payment was received and your order is being reviewed. We will contact you if anything is needed. A customer who comes back in another browser lands on the home page.
If the payment is not confirmed yet, or IntaSend cannot be reached at that moment, a Payment confirmation page shows Your payment is being confirmed by IntaSend (M-Pesa confirmations can take a minute). You will receive an e-mail as soon as it is confirmed. with the links Check again and Back to checkout. The order stays in Pending Payment, and the webhook confirms it as soon as IntaSend reports the final state. Back to checkout cancels the waiting order and gives the cart back.
If the payment failed, the order is cancelled (the stock goes back), the cart is restored and the customer is back in the cart with The payment was not successful. Please try again or choose another payment method. (with the IntaSend reason, if given). If the customer came back without paying, the message is The payment was not completed. Please try again or choose another payment method. The customer can place the order again. Each attempt gets its own IntaSend reference.
If IntaSend cannot start the payment, the order is cancelled, the cart is restored and the customer sees a message in the cart: IntaSend could not start the payment: and the reason from IntaSend, IntaSend is temporarily unavailable. Please try again in a moment or choose another payment method., or IntaSend is not available at the moment. Please choose another payment method or contact the store. The details are written to the log. An order total of zero cannot be paid with IntaSend. If the cart was already paid with another order, the new order is cancelled and the customer sees Your cart already has a payment for order # and the order number.
Magento maintenance mode closes the whole site, the webhook URL too. IntaSend retries the webhook later, and the order is also confirmed when the customer returns.
The module works with the standard Magento checkout. It takes one-time payments only. It has no refunds from Magento, no saved cards, no subscriptions and no inline (popup) payment form. Older checkout links of the same cart cannot be cancelled at IntaSend. The payment method is not offered for orders created in the Admin.
Orders
Order statuses
Pending Payment: the order was placed and the customer was sent to IntaSend, but IntaSend has not confirmed the payment yet. There is no invoice.
Processing: the payment was confirmed. The invoice is created with the IntaSend invoice ID as the transaction ID, and a note shows IntaSend payment confirmed by the Payment Status API. with the invoice, the payment method at IntaSend, the amount, the mode (test or live) and how it was confirmed (webhook or return).
On Hold: IntaSend reported a different amount or currency than the order total, or a partial payment. No invoice is created, the note explains it, the order e-mail is sent, and the payment information shows the reported invoice and amount. Check the payment in the IntaSend dashboard, then fulfil the order or refund the payment there. If a correct payment of the same order is confirmed later, the order leaves On Hold and is invoiced.
Canceled: the payment failed, the customer came back without paying, or the payment could not be started.
If a second payment arrives for a cart that is already paid, or a payment arrives after the order was cancelled or refunded, the order is not reopened. A note asks you to check it and refund it in IntaSend if needed. The notes are order comments that the customer does not see.
IntaSend payment information
On the admin order page (Sales > Orders > View) the payment information shows the payment method title and IntaSend reference, IntaSend environment, IntaSend checkout, IntaSend invoice, IntaSend provider and, after a mismatch, IntaSend reported invoice and IntaSend reported amount. The customer sees only the payment method title. On the Information tab the IntaSend payment history table lists every checkout attempt of the order with Created, Reference, Environment, Checkout, Amount, Invoice, Provider and Status, and below it the Verified invoices with the IntaSend state, amount, currency and result. The block is read only.
Refunds
Refunds are not sent to IntaSend from Magento: a credit memo offers only Refund Offline, which does not send money back. Refund the payment in the IntaSend dashboard, then create a credit memo with Refund Offline if needed.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox IntaSend Pay Gateway is the first row of the VibeFox IntaSend Pay Gateway group in Stores > Configuration > Sales > Payment Methods, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this store. Below them are the line Product: magento-payment-intasend and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only Admin users whose role allows the Payment Methods configuration section can change the key. The texts of the block follow the Admin interface locale (English and Russian are included).
If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the module keeps working on the last known status.
One key works on one domain: the domain of the default store view, also when the installation has several websites or stores. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, IntaSend is not shown to customers at checkout. If a payment is started anyway, the order is cancelled, the cart is restored and the customer sees This payment method is not available. Please choose another one. The Magento storefront does not know that you are logged in to the Admin, so the payment method is hidden for you too: you can set up the module before you buy a key, but not test it at checkout. A reminder appears in the System Messages of the Admin, with the links Enter the license key and Dismiss, which hides it for 7 days. Existing orders are not affected: payments already started are still confirmed.
When a license expires, the module keeps working, but updates and support need a renewal. The status is checked again automatically: once a day for the first 14 days after the key is entered, then once a week, by the Magento cron and while you work in the Admin. Uninstalling the module with its data always removes the license key and license status.
Troubleshooting
IntaSend does not appear at checkout: check that the license is active and Enable is Yes for the website of the store, and that the keys of the current mode are filled in and belong to that mode: sandbox keys in test mode, live keys in live mode. The Webhook and configuration field shows what is wrong. The currency of the cart must be supported and the order total must be above zero. Check Payment from applicable countries and Payment from specific countries against the customer's billing address, and Minimum order total and Maximum order total.
The payment went through, but the order stays Pending Payment: M-Pesa confirmations can take a moment. The webhook confirms the order when IntaSend reports the final state. Check that the webhook URL in the IntaSend dashboard (sandbox or live, the mode you use) is exactly the one shown under Webhook URL: and that the challenge there is the same as Webhook challenge, in the Default Config or for the website of the store. The order is also confirmed when the customer returns to the store or clicks Check again.
Webhook answers Ignored: webhook challenge not configured: Webhook challenge is empty. Enter the challenge from the IntaSend dashboard.
Webhook answers Invalid challenge: the challenge in IntaSend and in the module differ, or the webhook has no challenge.
Webhook answers Verification unavailable, retry later or Busy, retry later: IntaSend could not be reached at that moment, the order was being confirmed by another request, or an error occurred while the order was being updated. IntaSend retries the webhook. The reason is in the log.
Webhook answers Invoice not verified or Invoice does not match the reference: IntaSend did not confirm that this invoice belongs to the order. Nothing is changed.
The webhook URL shows Method not allowed in the browser: this is normal. The URL accepts only POST requests from IntaSend.
Order is On Hold: read the order notes. The paid amount or currency differed from the order, or the payment was partial. Check the payment in the IntaSend dashboard.
The customer is back in the cart with an error after Place Order: look at the Log field (turn on Debug log for more detail). If the keys of the current mode are wrong, the customer sees IntaSend is not available at the moment. Please choose another payment method or contact the store. If the log says that The store return URL contains characters IntaSend does not accept., the store address is the cause. The order of that attempt is cancelled.
The customer sees Invalid payment return: the return link was changed or does not belong to an order of this store. If the customer paid, the webhook still confirms the order.
The settings page or the checkout looks unchanged after installing or updating: run bin/magento setup:upgrade and bin/magento cache:flush; in production mode also setup:di:compile and setup:static-content:deploy.
Uninstall
Deleting the module code alone removes nothing from the database: the license key and the settings stay. To remove the data, uninstall the module with the Magento command:
Installed with Composer: run bin/magento module:uninstall --remove-data Vibefox_IntasendPayment. It removes the data and the code.
Installed in app/code: run bin/magento module:uninstall --non-composer Vibefox_IntasendPayment to remove the data, then bin/magento module:disable Vibefox_IntasendPayment, delete the folder app/code/Vibefox/IntasendPayment and run bin/magento setup:upgrade.
The license key and license status are always removed. If Remove data on uninstall is Yes, the settings and the log are removed too. If it is No, the settings are kept for a re-install. The tables of IntaSend checkout attempts and invoices are always kept. Existing orders keep their invoices, payment notes and transaction IDs.
IntaSend is a trademark of its respective owner. This module is not affiliated with or endorsed by IntaSend.
