Gathering detailed insights and metrics for cordova-plugin-cashfree-pg
Gathering detailed insights and metrics for cordova-plugin-cashfree-pg
Gathering detailed insights and metrics for cordova-plugin-cashfree-pg
Gathering detailed insights and metrics for cordova-plugin-cashfree-pg
This is the official cordova plugin for Cashfree payments.
npm install cordova-plugin-cashfree-pg
Typescript
Module System
Node Version
NPM Version
Swift (29.75%)
Java (22.6%)
TypeScript (15.14%)
JavaScript (14.24%)
CSS (10.95%)
HTML (7.31%)
Total Downloads
4,454
Last Day
2
Last Week
25
Last Month
111
Last Year
1,907
MIT License
3 Stars
70 Commits
3 Forks
3 Watchers
5 Branches
6 Contributors
Updated on Apr 01, 2025
Latest Version
1.0.8
Package Id
cordova-plugin-cashfree-pg@1.0.8
Unpacked Size
43.88 kB
Size
10.51 kB
File Count
17
NPM Version
10.9.2
Node Version
23.6.1
Published on
Apr 01, 2025
Cumulative downloads
Total Downloads
Last Day
100%
2
Compared to previous day
Last Week
212.5%
25
Compared to previous week
Last Month
-24.5%
111
Compared to previous month
Last Year
9.7%
1,907
Compared to previous year
1
2
Sample integration project for Cashfree Payment Gateway's Cordova SDK, facilitating seamless and secure payment processing within your Cordova application.
Install the plugin
1 2cd your-project-folder 3 4cordova plugin add cordova-plugin-cashfree-pg 5
You will need to generate a sessionID from your backend and pass it to app while initiating payments.
API Doc Link - https://docs.cashfree.com/reference/createorder
Note: This API is called only from your backend as it uses secretKey. Thus this API should never be called from App.
1const dropPaymentObject = { 2 "components": ["CARD", "UPI", "NB", "WALLET", "PAY_LATER"], //optional 3 "theme": { //optional 4 "navigationBarBackgroundColor": "#E64A19", 5 "navigationBarTextColor": "#FFFFFF", 6 "buttonBackgroundColor": "#FFC107", 7 "buttonTextColor": "#FFFFFF", 8 "primaryTextColor": "#212121", 9 "secondaryTextColor": "#757575" 10 }, 11 "session": { //required 12 "payment_session_id": "order_session_id", 13 "orderID": "order_id", 14 "environment": "SANDBOX" // "SANDBOX" or "PRODUCTION" 15 } 16}
1const upiPaymentObject = { 2 "theme": { //optional 3 "navigationBarBackgroundColor": "#E64A19", //ios 4 "navigationBarTextColor": "#FFFFFF", //ios 5 "buttonBackgroundColor": "#FFC107", //ios 6 "buttonTextColor": "#FFFFFF", //ios 7 "primaryTextColor": "#212121", 8 "secondaryTextColor": "#757575", //ios 9 "backgroundColor": "#FFFFFF" 10 }, 11 "session": { //required 12 "payment_session_id": "order_session_id", 13 "orderID": "order_id", 14 "environment": "SANDBOX" // "SANDBOX" or "PRODUCTION" 15 } 16}
1const webPaymentObject = { 2 "theme": { //optional 3 "navigationBarBackgroundColor": "#E64A19", 4 "navigationBarTextColor": "#FFFFFF" 5 }, 6 "session": { //required 7 "payment_session_id": "order_session_id", 8 "orderID": "order_id", 9 "environment": "SANDBOX" // "SANDBOX" or "PRODUCTION" 10 } 11}
Set the callback on the creation of your payment page.
1 2const callbacks = { 3 onVerify: function (result) { 4 console.log("This is in the Application Verify: " + result); 5 const orderId = result.orderID; 6 }, 7 onError: function (error){ 8 console.log("This is in the Application Error: " + error); 9 const orderID = error.orderID 10 const status = error.status 11 const code = error.code 12 const type = error.type 13 const message = error.message 14 } 15} 16CFPaymentGateway.setCallback(callbacks) // onLoad of the Page
1CFPaymentGateway.doDropPayment(dropPaymentObject)
1CFPaymentGateway.doWebCheckoutPayment(webPaymentObject)
1CFPaymentGateway.doUPIPayment(upiPaymentObject)
If you have questions, concerns, bug reports, etc, you can reach out to us using one of the following
For general instructions on how to contribute please refer to CONTRIBUTING.
No vulnerabilities found.