File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 2020 - name : Install dependencies
2121 run : npm install && npm install coveralls --save-dev
2222 - name : Run Tests
23- run : CLIENT_ID=$PG_CLIENT_ID SECRET_KEY=$PG_CLIENT_SECRET npm test && cd coverage && ls && cd .. && cat coverage/lcov.info | npx coveralls
2423 env :
2524 PG_CLIENT_ID : ${{ secrets.XCLIENTIDSANDBOX }}
2625 PG_CLIENT_SECRET : ${{ secrets.XCLIENTSECRETSANDBOX }}
2726 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
27+ run : CLIENT_ID=$PG_CLIENT_ID SECRET_KEY=$PG_CLIENT_SECRET npm test && cd coverage && ls && cd .. && cat coverage/lcov.info | npx coveralls
Original file line number Diff line number Diff line change 44dist
55coverage
66package-lock.json
7- test-results
7+ test-results
8+ .env
9+ .env /
Original file line number Diff line number Diff line change 2525 "test" : " jest --coverage && coveralls < coverage/lcov.info"
2626 },
2727 "dependencies" : {
28+ "@sentry/node" : " ^7.73.0" ,
2829 "axios" : " 1.7.7" ,
29- "@sentry/node" : " ^7.73.0"
30+ "cashfree-pg" : " ^5.0.3" ,
31+ "dotenv" : " ^16.5.0"
3032 },
3133 "devDependencies" : {
3234 "@types/chai" : " ^4.3.10" ,
Original file line number Diff line number Diff line change 1+ require ( 'dotenv' ) . config ( ) ;
12const { Cashfree, CardChannelEnum, AppProviderEnum } = require ( "cashfree-pg" ) ;
23const { test, expect } = require ( "@jest/globals" ) ;
34
45const cashfree = new Cashfree (
56 Cashfree . SANDBOX ,
6- process . env . CLIENT_ID ,
7- process . env . SECRET_KEY
7+ process . env . XClientId ,
8+ process . env . XClientSecret
89) ;
910
11+ console . log ( cashfree ) ;
12+ console . log ( process . env . XClientId ) ;
13+ console . log ( process . env . XClientSecret ) ;
14+
1015const orderAmount = 1 ;
1116const xApiVersion = "2025-01-01" ;
1217async function createOrderAndReturnSessionId ( ) {
You can’t perform that action at this time.
0 commit comments