Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
bin
public/stylesheets
routes
views
.gitignore
README.md
app.js
npm-debug.log
package-lock.json
package.json

README.md


Getting Started

Clone the above repository and extract the nodejs subfolder from inside the pg-integration-kits folder. Place it in some specific directory (for example in linux - /home/sharoh/cf-nodejs/.

Pre-requisites

1) NodeJS 

How to start

You'll first need to intall nodemon, it is as simple as running npm install -g nodemon on your machine.

Below we describe the NodeJS integration for Cashfree PG. You'll need Cashfree credentials for this setup to work. You can access the credentials from the merchant dashboard (API access > credentials) here.

Step 1

  • Open the file app.js, and update the value of the variable mode to "TEST"(for testing) or "PROD"(for production) depending on your environment (line 36).

  • Update the variable secretKey with the correct value for the mode you have selected in the app.js file (line number 37 and 67).

Step 2

Once you've installed nodemon in your system and updated the file with the correct secretKey values. Run the following commands from the folder where you have the app.js file, this will start your server.

nodemon --exec npm start
Card Number : 4111 1111 1111 1111
CVV : 123

You can enter any name, month and year for card expiration. For more details around test cards, see Test Data.

Step 3

  • Once you've entered the details you will be redirected to the Cashfree PG Simulator page. Here you can simulate either a failed or a successful transaction. You will then be redirected to the returnUrl(given in step 2) with the transaction details.

NOTE :

  • In the file app.js, please make sure that you are using the correct integration mode.
  • Give a valid returnUrl, since all the transaction details will be sent to this url.
  • It is imperative that you process the response correctly (by verifying the signature) to prevent any fraud on your website.

Support

For further queries reach us at techsupport@gocashfree.com.


You can’t perform that action at this time.