paykun node js integrationNode JS Payment Gateway 

Paykun Payment Gateway Integration with node.js

paykan payment is the simplest way of collecting online payments. Its really like new startups and building products globally.

Follow below Steps to Integrate paykun payment gateway in node.js.

#1 Step: Generate Access token and API Secret :

You can generate Or Regenerate Access token and API Secret from login into your paykun payment admin panel, Then Go To Settings -> Security -> API Keys. There you will find the generate button if you have not generated an API key before.

If you have generated API key before then you will see the date of the API key generate, since you will not be able to retrieve the old API key (For security reasons) we have provided the re-generate option, so you can re-generate API key in case you have lost the old one.

Note: Once you re-generate the API key your old API key will stop working immediately. So be cautious while using this option.

#2 Step : Download/ clone git repo:

Click here to go to the git repository and download/ clone

Then copy Paykun folder to your project and include the below code in your application start page.

const Payment = require('./paykun/Payment').Payment;

Then add all the required keys like merchantId, accessToken, EncryptionKey

If you want to run the sample project then immediately after git clone, run below command in the terminal from the root folder.

$ npm install

To run the sample, execute the below code.
Note: before you run app please change merchantId, accessToken, EncryptionKey in “config/config.global.js”.

$ node index.js

final to verify sample Paykun application open browser and type “http://localhost:3000”
Note: if you are using port 3000 for another app, please change in sample project root /index.js file from 3000 to new port no. before you run, accordingly change in URL also.

Also Read:  FB Messenger now supports PayPal in bots

Related posts