🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms SSLCommerz Premium Add-on Setup Guide

Updated 10 min read Gravity Forms Integrations A–Z
On this page
  1. Installation
  2. Currencies and amounts
  3. Settings
  4. The IPN
  5. The feed
  6. What the customer sees
  7. Payment statuses
  8. The entry screen
  9. Refunds
  10. Testing with a sandbox store
  11. Going live
  12. For developers
  13. How it differs
  14. Troubleshooting
  15. Uninstall

The Gravity Forms SSLCommerz Premium Add-on connects Gravity Forms to your own SSLCommerz store in Bangladesh. When a form with an SSLCommerz feed is submitted, the add-on starts an SSLCommerz payment session for the exact total Gravity Forms calculated and sends the customer to the SSLCommerz payment page, where they pay with a card, mobile banking or internet banking, whatever is active on your store. Payment details are entered at SSLCommerz, never on your website.

When SSLCommerz reports the payment, the add-on checks the IPN signature with your store password, reads the payment back with the SSLCommerz Order Validation API and only then marks the entry Paid, with the bank transaction ID as the transaction ID. This guide covers installation, currencies, every setting, the IPN, the feed, what the customer sees, the payment statuses, refunds, testing with a sandbox store and going live.

Before you start

You need Gravity Forms 2.9 or newer, an SSLCommerz sandbox store for testing (store ID and store password from the SSLCommerz developer registration), and for live payments an approved SSLCommerz merchant store and a site that SSLCommerz can reach from the internet, so it can send IPNs.

Installation

  1. Download the add-on zip from your GravityExtra account and upload it in Plugins → Add New → Upload Plugin, then activate it.
  2. Open Forms → Settings → SSLCommerz and activate your licence key. The SSLCommerz settings appear once the licence is active.
  3. In Forms → Settings, set the Gravity Forms currency to Bangladeshi Taka (or one of the other currencies below).

Currencies and amounts

Gravity Forms does not include the Bangladeshi taka out of the box. The add-on adds the taka (and the Indian rupee) to the Gravity Forms currency list as soon as it is active, with two decimals, and never changes a currency that another plugin already defined. SSLCommerz settles in taka: forms in US dollars, euros, Singapore dollars, rupees or ringgit are converted to taka by SSLCommerz at its current rate, while the entry keeps the amount in the form currency.

Gravity Forms currency Decimals Shown in forms as At SSLCommerz
Bangladeshi taka (BDT) 2 (poisha) ৳ 2,450.00 Charged as is; 10.00 to 500,000.00 BDT
US dollar (USD) 2 $19.99 Converted to BDT by SSLCommerz at its current rate
Euro (EUR) 2 19,99 € Converted to BDT
Singapore dollar (SGD) 2 $ 19.99 Converted to BDT
Indian rupee (INR) 2 ₹1,250.50 Converted to BDT
Malaysian ringgit (MYR) 2 RM 19.99 Converted to BDT

The amount is worked out on your server from the entry, never from the browser. A total with more than two decimals is refused before anything is sent, so the customer is never charged a rounded amount. Taka payments go from 10.00 to 500,000.00 BDT, the range SSLCommerz takes; for other currencies the add-on takes 1.00 to 500,000.00 and SSLCommerz checks the converted amount. A filter can lower the largest amount.

Settings

SSLCommerz settings: Test or Live mode, the store ID and masked store password of each mode, the currency line, the connection line and the IPN address
Settings: enter the store ID and store password of the sandbox store (Test) and your live store (Live); the IPN address is sent with every payment.
Setting What it does
Mode Test (the default) sends payments to the SSLCommerz sandbox (sandbox.sslcommerz.com) with your sandbox store and test cards, so no money moves. Live uses securepay.sslcommerz.com with your live store. Each entry remembers the mode it was paid in.
Test / Live store ID The store ID SSLCommerz sent you when your store was set up: the sandbox store for Test, the live store for Live.
Test / Live store password The store password (API password) that comes with the store ID. It signs in to the SSLCommerz API and checks every IPN signature. Checked with SSLCommerz when you save (a lookup that changes nothing), stored encrypted, shown masked (first and last four characters).
Currency A check line: BDT is charged as is; USD, EUR, SGD, INR and MYR are converted by SSLCommerz; any other Gravity Forms currency is refused.
Connection Shows whether SSLCommerz accepts the store ID and password of the current mode.
IPN The IPN address the add-on sends with every payment (you can also enter it in your SSLCommerz merchant panel), and when the last IPN with a valid signature arrived.

The IPN

SSLCommerz tells your site about payments with an IPN (instant payment notification): a signed message posted to your site. The add-on sends its IPN address with every payment session, so there is nothing to set up for it to work. You can also enter the address in your SSLCommerz merchant panel (My Stores → IPN Settings) so that every payment of the store is reported.

  1. Copy the IPN address from the IPN line of the add-on settings. It ends in /wp-json/gravityextra-sslc/v1/ipn.
  2. Optionally, enter it in the IPN settings of your store in the SSLCommerz merchant panel.
  3. If your server has a firewall, allow the SSLCommerz IPN addresses SSLCommerz lists in its documentation, on ports 80 and 443.

Each IPN is checked before anything happens: its verify_sign must match the signed fields and your store password, the transaction ID and status must be signed, and the transaction must be one this site started in the same mode. Then the add-on reads the payment back from SSLCommerz. An IPN that arrives twice is acknowledged without changing the entry again. If the read-back fails, the add-on answers with an error so SSLCommerz sends the IPN again.

No IPN yet?

Payments are still confirmed when the customer comes back from the payment page and by the status check every five minutes. The IPN makes the update instant, also when the customer closes the browser after paying.

The feed

The SSLCommerz feed: products and services with the form total, the customer name, email, phone, address and city mapping, the description with merge tags, the product category and notifications after payment
The feed: map the customer name, email and phone (required by SSLCommerz) and the address, and write the product description and category.
  • Transaction type: Products and Services, or Donations. The payment amount is the form total or one product field.
  • Name, email and phone are required by SSLCommerz: map them to your form fields. Address, city, postcode and country are optional; SSLCommerz asks for them on every payment, so empty ones are sent as “N/A” (and Bangladesh for the country).
  • Description: the product name shown in your SSLCommerz merchant panel (merge tags work).
  • Product category: a short category such as Education, Services or Donation.
  • Notifications: hold the form notifications until the customer has paid (on by default).

What the customer sees

A pottery class booking form with quantities, the customer name, email, phone, address and city, and the total in Bangladeshi taka, with the Continue to payment button
The form: Gravity Forms works out the total in taka; the customer pays it on the SSLCommerz payment page.

The customer fills in the form and sees the total, for example ৳ 2,450.00. After pressing the submit button they go to the SSLCommerz payment page and choose a card, mobile banking or internet banking. After paying they come back to your form page, where the add-on reads the payment from SSLCommerz and shows your confirmation. If the payment fails or they cancel, they see that nothing was charged and can return to the form.

Payment statuses

Entry status When
Processing The customer was sent to the SSLCommerz payment page and the payment is not confirmed yet. If a card is declined, the entry stays here with a note: the customer can try again.
Paid The SSLCommerz Order Validation API shows a valid payment for the entry’s transaction ID, amount and currency. The bank transaction ID is stored as the transaction ID.
Failed The payment could not be started (for example a store password SSLCommerz refused). The customer was not charged and stayed on the form.
Cancelled SSLCommerz shows the payment as cancelled or expired, or no payment arrived within a day. If SSLCommerz later reports it as valid, the entry still becomes Paid.
Refunded Refunds completed at SSLCommerz add up to the whole amount. Partial refunds are recorded as notes and transactions while the entry stays Paid.

The entry screen

An entry paid through SSLCommerz: the SSLCommerz box with the status, amount, bank transaction ID, payment method, transaction ID, validation ID and SSLCommerz status, the Refresh status button and the refund form, and the entry notes
The entry: status, bank transaction ID and validation ID, read back from SSLCommerz, with refunds one click away.

The SSLCommerz box on the entry shows the status, the amount, the bank transaction ID, the payment method, your transaction ID, the SSLCommerz validation ID and the last status SSLCommerz reported. Refresh status reads the payment from SSLCommerz again. Test payments carry a “Test — test payment” badge, and a payment SSLCommerz marks as high risk gets a warning note so you can check it before you deliver. Users need the Gravity Forms capability to edit entries (administrators always can) to see the buttons.

Refunds

  • Type the amount in the refund field of a paid taka entry and press Refund with SSLCommerz. The full remaining amount is filled in for you.
  • The add-on reads the payment back first, then sends the refund to SSLCommerz with a unique refund ID, and records it when SSLCommerz reports it as refunded.
  • Several partial refunds are possible up to the paid amount. When the whole amount is refunded, the entry becomes Refunded.
  • If SSLCommerz takes a moment, the entry shows “Refund requested” and the status check records it later. A refund SSLCommerz cancels frees the amount again.
  • If SSLCommerz does not answer a refund request, the request stays reserved: check your merchant panel, then use Release the unanswered refund request if no refund was made.
  • SSLCommerz requires the public IP address of your server to be registered for refunds in the live system; ask SSLCommerz support to add it.
  • Payments made in another currency than taka, and refunds you make in the merchant panel, are handled in the panel.

Testing with a sandbox store

  1. Register for an SSLCommerz sandbox store and note its store ID and store password.
  2. Keep the add-on in Test mode, enter the sandbox store ID and password and save. The connection line turns green.
  3. Submit your form and pay on the sandbox payment page with an SSLCommerz test card.
  4. Check the entry: Paid, with the bank transaction ID and a “Test — test payment” note. Try a partial refund.
  5. Try a cancelled payment: the customer sees that nothing was charged.

Going live

  • Enter the live store ID and store password from SSLCommerz, switch to Live and save.
  • Make one small real payment and refund it.
  • Your site must be reachable from the internet for live IPNs.

For developers

The filter gravityextra_sslcommerz_request_fields can change the customer fields, the product name and the product category. The amount, the currency, the transaction ID and the return addresses are always set by the add-on. gravityextra_sslcommerz_max_minor lowers the largest payment and gravityextra_sslcommerz_payments_per_hour changes the hourly cap of new payments (300 by default).

// Put the class date in the product name of one form (ID 7) and use a fixed category.
// The amount, currency, transaction ID and the return addresses cannot be changed here.
add_filter( 'gravityextra_sslcommerz_request_fields', function ( $body, $feed, $entry, $form ) {
    if ( 7 !== (int) rgar( $form, 'id' ) ) {
        return $body;
    }
    $body['product_name']     = 'Class ' . rgar( $entry, '9' ) . ' / booking ' . rgar( $entry, 'id' );
    $body['product_category'] = 'Education';
    return $body;
}, 10, 4 );

How it differs

  • It connects to your own SSLCommerz store directly with the SSLCommerz API, so SSLCommerz settles the money to you under your own merchant agreement, and the payment page shows every method you have switched on.
  • It never trusts the data posted back to your site or the IPN on its own. The IPN signature is checked with your store password, and then the payment is read back from SSLCommerz with the Order Validation API. Only a valid payment with the entry’s transaction ID, amount and currency marks the entry Paid.
  • It adds the taka and the rupee to Gravity Forms, so a total of ৳ 2,450.00 is shown, sent and stored as exactly 2450.00, never misread or rounded.
  • Refunds, including several partial refunds, are made from the Gravity Forms entry and recorded once per SSLCommerz refund.

Troubleshooting

What you see What to check
“SSLCommerz did not accept this store ID and password” Enter them again for the right store: the sandbox store for Test, the live store for Live.
“Online payment is not available in GBP” (or another code) Set the Gravity Forms currency to BDT, USD, EUR, SGD, INR or MYR.
“Please enter a phone number to pay online” SSLCommerz needs the customer’s phone and email: map both in the feed and make the fields required.
Entries stay Processing after payment Check that SSLCommerz can reach your IPN address (firewall, maintenance mode). The status check every five minutes confirms payments anyway.
“The SSLCommerz payment does not match this entry” The amount or currency SSLCommerz reports differs from the entry. Check the transaction in your merchant panel; the entry is not marked Paid automatically.
IPNs answered 401 The store password in the add-on does not match the store that sent the IPN.

Uninstall

Deleting the add-on from the Plugins screen removes its settings (including the encrypted store passwords), schedules and temporary data. Entries, notes and payments at SSLCommerz stay as they are.

Plans: one site $49 a year, five sites $69 a year, unlimited sites $199 a year. See the Gravity Forms SSLCommerz Premium Add-on page for details.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr