@@ -11,7 +11,28 @@ npm i ssl-commerz-node
1111``` js
1212const SSLCommerz = require (' ssl-commerze-node' );
1313const PaymentSession = SSLCommerz .PaymentSession ;
14+ // For live payment set first parameter `false` and for sandbox set it `true`
1415const 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
0 commit comments