{"id":19636640,"url":"https://github.com/nipuna21018/cordova-plugin-payhere","last_synced_at":"2025-10-09T06:13:09.230Z","repository":{"id":57208770,"uuid":"269338418","full_name":"nipuna21018/cordova-plugin-payhere","owner":"nipuna21018","description":"Cordova plugin to add payhere.lk mobile SDK into your ionic mobile app","archived":false,"fork":false,"pushed_at":"2020-07-17T08:39:53.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T23:51:37.335Z","etag":null,"topics":["android","cordova","cordova-plugin","ionic4","ionic5","ios","native","payhere","payment-gateway"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/nipuna21018.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}},"created_at":"2020-06-04T11:12:22.000Z","updated_at":"2020-10-22T12:23:31.000Z","dependencies_parsed_at":"2022-09-04T03:20:18.707Z","dependency_job_id":null,"html_url":"https://github.com/nipuna21018/cordova-plugin-payhere","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nipuna21018/cordova-plugin-payhere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nipuna21018%2Fcordova-plugin-payhere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nipuna21018%2Fcordova-plugin-payhere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nipuna21018%2Fcordova-plugin-payhere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nipuna21018%2Fcordova-plugin-payhere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nipuna21018","download_url":"https://codeload.github.com/nipuna21018/cordova-plugin-payhere/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nipuna21018%2Fcordova-plugin-payhere/sbom","scorecard":{"id":688700,"data":{"date":"2025-08-11","repo":{"name":"github.com/nipuna21018/cordova-plugin-payhere","commit":"5d978b30d7baf9c11bacddd97d84a7aedcef8d06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T01:43:31.230Z","repository_id":57208770,"created_at":"2025-08-22T01:43:31.230Z","updated_at":"2025-08-22T01:43:31.230Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000850,"owners_count":26082950,"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":["android","cordova","cordova-plugin","ionic4","ionic5","ios","native","payhere","payment-gateway"],"created_at":"2024-11-11T12:30:18.729Z","updated_at":"2025-10-09T06:13:09.201Z","avatar_url":"https://github.com/nipuna21018.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ionic Cordova Native Plugin for [PayHere](https://payhere.lk) Payment Gateway\n\nThis plugin can be used to add native behaviour of PayHere mobile SDK into your Ionic cordova project. Plugin supports two platforms Android \u0026 IOS\n\n# Installation\n\n---\n\n### Plugin\n\nAdd the plugin and type definitions to your project\n\n```\n    cordova plugin add cordova-plugin-payhere@0.0.10\n    npm install types-payhere@0.0.5 --save\n```\n\nIt is also possible to install via repo url directly ( unstable )\n\n```\n    cordova plugin add https://github.com/nipuna21018/cordova-plugin-payhere.git\n```\n\n### CocoaPods\n\nNote: This is only if you need plugin to support ios platform\n\nCocoaPods is a dependency manager used in ios projects. We need to add PayHere's native ios SDK dependancy to our project.\n\nYou can install CocoaPods with the following command, ignore if CocoaPods already installed on your computer\n\n```bash\n$ gem install cocoapods\n```\n\nFollow these teps to `payhereSDK` into your ios project\n\n- Go to platform/ios folder in your ionic project\n- Open `Podfile` inside `ios` folder. If `Podfile` not available. Simply run the command `pod init` on that folder\n- Now you need to add two line to the pod file `use_frameworks!` \u0026 `pod 'payHereSDK' , '2.0.0'`\n  -- example `podfile`\n\n```ruby\nplatform :ios, '11.0'\nuse_frameworks!\ntarget '\u003cyour project name\u003e' do\n\tproject '\u003cyour project name\u003e.xcodeproj'\n\tpod 'payHereSDK', '2.0.0'\nend\n```\n\n- Now run following command to install all dependancies\n\n```bash\n$ pod install\n```\n\n- That's all. Now all dependencies are installed on your ios project\n\n# Usage\n\n---\n\nAdd the plugin to app's provider list\n\n```ts\nimport { PayHere } from \"types-payhere/ngx\";\n\n@NgModule({\n  imports:  [ ... ],\n  declarations: [ ... ],\n  providers: [..., PayHere],\n})\nexport class AppModule {}\n```\n\nIn your page\n\n### Checkout Payment Request:\n\n```ts\nimport { PayHere, CheckoutRequest, Currency } from \"types-payhere/ngx\";\n\nconstructor(private payhere: PayHere) { }\n\n...\n\nconst checkoutRequest: CheckoutRequest = {\n        sandboxEnabled:true, // default is false\n        merchantId: \"11111\",\n        merchantSecret: \"\u003cAdd your app at Settings \u003e Domains \u0026 Credentials, to get this\u003e\",\n\t      notifyURL: \"http://sample.com/notify\",\n        amount: 100.00,\n        currency: Currency.LKR,\n        orderId: \"123\",\n        itemsDescription: \"Item Desc\",\n        custom1: \"\",\n        custom2: \"\",\n        customer: {\n          firstName: \"Nipuna\",\n          lastName: \"Harshana\",\n          email: \"nipuna@comapny.com\",\n          phone: \"0712345678\",\n        },\n        billing: {\n          address: \"No 127, Street name\",\n          city: \"Colombo\",\n          country: \"Sri Lanka\",\n        },\n        shipping: {\n          address: \"Park Street\",\n          city: \"Colombo\",\n          country: \"Sri Lanka\",\n        },\n        items: [\n          {\n            id: \"1\",\n            name: \"My first item name\",\n            quantity: 1,\n            amount: 10.0,\n          },\n          {\n            id: \"2\",\n            name: \"My second item name\",\n            quantity: 1,\n            amount: 20.0,\n          },\n        ],\n      }\n\nthis.payhere.checkout(checkoutRequest).then((response:any) =\u003e {\n // handle response\n  console.log(JSON.parse(response));\n}, (err) =\u003e {\n // Handle error\n  console.log(JSON.parse(err));\n});\n```\n\n### PreAproval Payment Request:\n\n```ts\nimport { PayHere, PreApproveRequest, Currency } from \"types-payhere/ngx\";\n\nconstructor(private payhere: PayHere) { }\n\n...\n\nconst preApproveRequest: PreApproveRequest = {\n        sandboxEnabled:true, // default is false\n        merchantSecret: \"\u003cAdd your app at Settings \u003e Domains \u0026 Credentials, to get this\u003e\",\n\t      notifyURL: \"http://sample.com/notify\",\n        merchantId: \"11111\",\n        currency: Currency.LKR,\n        orderId: \"123\",\n        itemsDescription: \"Desc\",\n        custom1: \"\",\n        custom2: \"\",\n        customer: {\n          firstName: \"Nipuna\",\n          lastName: \"Harshana\",\n          email: \"nipuna@comapny.com\",\n          phone: \"0712345678\",\n        },\n        billing: {\n          address: \"No 127, Street name\",\n          city: \"Colombo\",\n          country: \"Sri Lanka\",\n        },\n        items: [],\n      }\n\nthis.payhere.preApprove(preApproveRequest).then((response:any) =\u003e {\n // handle response\n  console.log(JSON.parse(response));\n}, (err) =\u003e {\n // Handle error\n  console.log(JSON.parse(err));\n});\n```\n\n### Recurring Payment Request:\n\n```\nnot supported yet\n```\n\n# PayHere API \u0026 SDK reference\n\n---\n\nSee [Android SDK](https://support.payhere.lk/api-\u0026-mobile-sdk/mobile-sdk-for-android), [iOS SDK](https://support.payhere.lk/api-\u0026-mobile-sdk/mobile-sdk-for-ios)\n\n# Todos\n\n---\n\n- Add support for Recurring Payment Request\n- Add browser support\n\n# License\n\n---\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnipuna21018%2Fcordova-plugin-payhere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnipuna21018%2Fcordova-plugin-payhere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnipuna21018%2Fcordova-plugin-payhere/lists"}