{"id":20148015,"url":"https://github.com/droiddevgeeks/nextjscapacitorcashfreesample","last_synced_at":"2025-10-09T15:21:49.708Z","repository":{"id":253398212,"uuid":"843377227","full_name":"droiddevgeeks/NextjsCapacitorCashFreeSample","owner":"droiddevgeeks","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-09T18:16:32.000Z","size":532,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T20:27:46.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droiddevgeeks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-16T11:35:27.000Z","updated_at":"2025-08-09T18:16:35.000Z","dependencies_parsed_at":"2024-08-16T13:26:34.447Z","dependency_job_id":"9aa6eab8-80be-4dd1-b28c-d937c7a04ff9","html_url":"https://github.com/droiddevgeeks/NextjsCapacitorCashFreeSample","commit_stats":null,"previous_names":["droiddevgeeks/nextjscapacitorcashfreesample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/droiddevgeeks/NextjsCapacitorCashFreeSample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FNextjsCapacitorCashFreeSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FNextjsCapacitorCashFreeSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FNextjsCapacitorCashFreeSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FNextjsCapacitorCashFreeSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droiddevgeeks","download_url":"https://codeload.github.com/droiddevgeeks/NextjsCapacitorCashFreeSample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FNextjsCapacitorCashFreeSample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001643,"owners_count":26083146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T22:33:45.101Z","updated_at":"2025-10-09T15:21:49.703Z","avatar_url":"https://github.com/droiddevgeeks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CashFree NextJs Capacitor SDK Sample\n\n\n## **Description**\n\nSample integration project for CashFree Payment Gateway's in NextJs Capacitor platform.\n\n\n## Installation:\nInstall the plugin\n\n```bash\n\nnpm i @awesome-cordova-plugins/cashfree-pg@latest\nnpm i @awesome-cordova-plugins/core@latest\nnpm i cordova-plugin-cashfree-pg@capacitor\n\nnpx cap sync \nnpx cap sync android\nnpx cap run android\n\n```\n\n### Issue in awesome-cordova-plugins\nhttps://github.com/danielsogl/awesome-cordova-plugins/issues/4284\n \n``Cannot use import statement outside a module``\n\nWe have work around for this by using lazy loading\nhttps://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-external-libraries\n\n```\nconst loadCashfreePg = () =\u003e import('@awesome-cordova-plugins/cashfree-pg');\n\n\nconst initiateWebPayment = async () =\u003e {\n        const {CFEnvironment, CFPaymentGateway, CFSession, CFWebCheckoutPayment} = await loadCashfreePg();\n        const callbacks = {\n            onVerify: function (result) {\n                console.log(\"This is in the SDK Verify: \" + JSON.stringify(result));\n            },\n            onError: function (error) {\n                console.log(\"This is in the SDK Error: \" + JSON.stringify(error));\n            }\n        };\n        CFPaymentGateway.setCallback(callbacks)\n        CFPaymentGateway.doWebCheckoutPayment(\n            new CFWebCheckoutPayment(\n                new CFSession(\"session_jOkl-xetsUdUiuVFxhPMhbIHh6UTI8hM_dOxgI3HBiCkjxGHkFHetws8ijujFDe3En3kiKLrYNZQEODPkr62bpS3kb7zufM1b5FzVnEncSFy\",\n                    \"order_101024392kjkZw8fi4dAkMlUChfG9TYpHsI\",\n                    CFEnvironment.SANDBOX\n                ),\n                null)\n        )\n};\n\n \u003cdiv\u003e\n       \u003ch1\u003eCashFree Payment\u003c/h1\u003e\n       \u003cbutton onClick={initiateWebPayment}\u003eStart Payment\u003c/button\u003e\n\u003c/div\u003e\n\n\n```\n\n### Sample Video\nhttps://github.com/user-attachments/assets/476d8655-a0e9-4647-a5ce-17d316966425\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroiddevgeeks%2Fnextjscapacitorcashfreesample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroiddevgeeks%2Fnextjscapacitorcashfreesample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroiddevgeeks%2Fnextjscapacitorcashfreesample/lists"}