DEV Community

Cover image for SSLCommerz works with frontend, backend, and database
Arfan Hosen Ovi
Arfan Hosen Ovi

Posted on

SSLCommerz works with frontend, backend, and database

πŸͺœ Step 1: Sandbox Account
Sign up on SSLCommerz sandbox for test payments. Save your Store ID and Password.

πŸͺœ Step 2: Backend Setup
Create a Node + Express server, install sslcommerz-lts, and build /init to send payment and customer info plus redirect URLs.

πŸͺœ Step 3: Frontend Payment
Add a React β€œPay Now” button. Post data to /init, get the Gateway URL, and redirect users to SSLCommerz.

πŸͺœ Step 4: Handle Result
After payment, verify status on redirect URLs and update MongoDB.

πŸͺœ Step 5: Display Outcome
Show users payment success, failure, or cancellation immediately.

Top comments (0)