cashfree-pg 3.0.1 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/run-tests.yml +26 -0
- package/README.md +2 -2
- package/api.ts +131 -94
- package/dist/api.d.ts +59 -22
- package/dist/api.js +76 -76
- package/dist/esm/api.d.ts +59 -22
- package/dist/esm/api.js +76 -76
- package/jest.config.js +5 -0
- package/package.json +15 -5
- package/tests/orders.test.ts +653 -0
- package/tsconfig.json +2 -1
- package/.github/workflows/publish-dev-channel.yml +0 -26
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Trigger Tests on Pull Request.
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- name: Use Node.js
|
|
16
|
+
uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: '21.x'
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm install && npm install coveralls --save-dev
|
|
21
|
+
- name: Run Tests
|
|
22
|
+
run: CLIENT_ID=$PG_CLIENT_ID SECRET_KEY=$PG_CLIENT_SECRET npm test && cd coverage && ls && cd .. && cat coverage/lcov.info | npx coveralls
|
|
23
|
+
env:
|
|
24
|
+
PG_CLIENT_ID: ${{ secrets.XCLIENTIDSANDBOX }}
|
|
25
|
+
PG_CLIENT_SECRET: ${{ secrets.XCLIENTSECRETSANDBOX }}
|
|
26
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Cashfree PG Node SDK
|
|
2
|
-
     
|
|
2
|
+
      [](https://coveralls.io/github/cashfree/cashfree-pg-sdk-nodejs?branch=main) [](https://github.com/cashfree/cashfree-pg-sdk-nodejs/actions/workflows/publish.yml)
|
|
3
3
|
|
|
4
4
|
The Cashfree PG Node SDK offers a convenient solution to access [Cashfree PG APIs](https://docs.cashfree.com/reference/pg-new-apis-endpoint) from a server-side JavaScript applications.
|
|
5
5
|
|
|
@@ -29,7 +29,7 @@ Cashfree.XClientSecret = "<x-client-secret>";
|
|
|
29
29
|
Cashfree.XEnvironment = Cashfree.Environment.SANDBOX;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Generate your API keys (x-client-id , x-secret
|
|
32
|
+
Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant Dashboard](https://merchant.cashfree.com/merchants/login)
|
|
33
33
|
|
|
34
34
|
### Basic Usage
|
|
35
35
|
Create Order
|