https://github.com/droiddevgeeks/sampleionicangularcapacitor
https://github.com/droiddevgeeks/sampleionicangularcapacitor
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/droiddevgeeks/sampleionicangularcapacitor
- Owner: droiddevgeeks
- Created: 2024-12-02T11:20:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T09:51:56.000Z (over 1 year ago)
- Last Synced: 2025-02-03T18:15:12.379Z (over 1 year ago)
- Language: TypeScript
- Size: 502 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CashFree Capacitor SDK Sample with Ionic & Angular
## **Description**
Sample integration project for CashFree Payment Gateway's in Ionic Angular Capacitor platform.
## Installation:
Install the plugin
```bash
npm i @awesome-cordova-plugins/cashfree-pg
npm i @awesome-cordova-plugins/core
npm i cordova-plugin-cashfree-pg
npx cap sync
npx cap sync android
npx cap run android
```
Sample Integration code
```
const callbacks = {
onVerify: function (result:any) {
console.log("This is in the SDK Verify: " + JSON.stringify(result));
},
onError: function (error: any) {
console.log("This is in the SDK Error: " + JSON.stringify(error));
}
};
//Set Callback (Mandatory)
CFPaymentGateway.setCallback(callbacks)
//Call Webcheckout pamyent
CFPaymentGateway.doWebCheckoutPayment(
new CFWebCheckoutPayment(
new CFSession("session_Z7Sj6ZyrTNiU1PWxrgPoQ3zNkbQpPrSAhiilBn6mZnOq5PvIT7NqVnw9vm-6Wb5cT3HBTqufejP-UlK6OEiI88fYXvEYIadw6vEp_TLbGgXc",
"order_101024392penKNwgrYS4EcTwEWHIFlCdApr",
CFEnvironment.SANDBOX
),
null)
)
```
### Sample Test UPI App
Doc : https://docs.cashfree.com/docs/cashfree-upi-intent-simulator-apk
APK : https://github.com/cashfree/nextgen-android/blob/master/assets/SampleTestUPISimulator.apk