cashfree-pg 3.0.5 → 3.0.6
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 +3 -2
- package/README.md +14 -2
- package/api.ts +416 -96
- package/dist/api.js +384 -96
- package/dist/esm/api.js +384 -96
- package/package.json +1 -1
- package/tests/orders.test.ts +18 -83
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Cashfree PG Node SDK
|
|
2
|
-
      [      [](https://coveralls.io/github/cashfree/cashfree-pg-sdk-nodejs?branch=main)
|
|
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
|
|
|
@@ -11,7 +11,7 @@ Cashfree's PG API Documentation - https://docs.cashfree.com/reference/pg-new-api
|
|
|
11
11
|
|
|
12
12
|
Learn and understand payment gateway workflows at Cashfree Payments [here](https://docs.cashfree.com/docs/payment-gateway)
|
|
13
13
|
|
|
14
|
-
Try out our interactive guides at [Cashfree
|
|
14
|
+
Try out our interactive guides at [Cashfree Dev Studio](https://www.cashfree.com/devstudio) !
|
|
15
15
|
|
|
16
16
|
## Getting Started
|
|
17
17
|
|
|
@@ -34,6 +34,18 @@ Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant D
|
|
|
34
34
|
### Basic Usage
|
|
35
35
|
Create Order
|
|
36
36
|
```javascript
|
|
37
|
+
var request = {
|
|
38
|
+
"order_amount": 1,
|
|
39
|
+
"order_currency": "INR",
|
|
40
|
+
"order_id": "order_34692745",
|
|
41
|
+
"customer_details": {
|
|
42
|
+
"customer_id": "walterwNrcMi",
|
|
43
|
+
"customer_phone": "9999999999"
|
|
44
|
+
},
|
|
45
|
+
"order_meta": {
|
|
46
|
+
"return_url": "https://www.cashfree.com/devstudio/preview/pg/web/checkout?order_id={order_id}"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
37
49
|
Cashfree.PGCreateOrder("2022-09-01", request).then((response) => {
|
|
38
50
|
console.log('Order fetched successfully:',response.data)
|
|
39
51
|
}).catch((error) => {
|