Skip to content

Commit 74e76c1

Browse files
committed
Update Documentation
1 parent f8ef5c5 commit 74e76c1

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,28 @@ npm i ssl-commerz-node
1111
```js
1212
const SSLCommerz = require('ssl-commerze-node');
1313
const PaymentSession = SSLCommerz.PaymentSession;
14+
// For live payment set first parameter `false` and for sandbox set it `true`
1415
const payment = new PaymentSession(true, YOUR_STORE_ID, STORE_STORE_PASS)
15-
// For live payment set first parameter false
1616

17-
```
17+
// Set the urls
18+
payment.setUrls({
19+
success: 'yoursite.com/success', // If payment Succeed
20+
fail: 'yoursite.com/fail', // If payment failed
21+
cancel: 'yoursite.com/cancel', // If user cancel payment
22+
ipn: 'yoursite.com/ipn' // SSLCommerz will send http post request in this link
23+
});
24+
25+
// Set order details
26+
payment.setOrderInfo({
27+
total_amount: 1570, // Number field
28+
currency: 'BDT', // Must be three character string
29+
tran_id: 'ref12345667', // Unique Transaction id
30+
emi_option: 0 // 1 or 0,
31+
multi_card_name: 'internetbank', // Do not Use! If you do not customize the gateway list,
32+
allowed_bin: '371598,371599,376947,376948,376949', // Do not Use! If you do not control on transaction
33+
emi_max_inst_option: 3, // Max instalment Option
34+
emi_allow_only: 0 // Value is 1/0, if value is 1 then only EMI transaction is possible
35+
});
36+
37+
```
38+
See this for details: https://developer.sslcommerz.com/doc/v4/#ready-the-parameters

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
},
1313
"author": "Simanta Paul simanta.paul.26@gmail.com",
1414
"license": "ISC",
15+
"keywords": [
16+
"nodejs",
17+
"sslcommerz"
18+
],
1519
"dependencies": {
1620
"form-data": "^4.0.0",
1721
"node-fetch": "^2.6.1"

0 commit comments

Comments
 (0)