{"id":16085693,"url":"https://github.com/iamraphson/typescript-ravepayment","last_synced_at":"2025-04-05T13:42:20.078Z","repository":{"id":78533703,"uuid":"122954026","full_name":"iamraphson/typescript-ravepayment","owner":"iamraphson","description":"RavePay Library for Typescript","archived":false,"fork":false,"pushed_at":"2018-10-10T19:13:00.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T09:50:01.629Z","etag":null,"topics":["flutterwave","payment","ravepay","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamraphson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-02-26T10:32:08.000Z","updated_at":"2019-05-23T09:20:27.000Z","dependencies_parsed_at":"2023-05-21T16:00:39.990Z","dependency_job_id":null,"html_url":"https://github.com/iamraphson/typescript-ravepayment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamraphson%2Ftypescript-ravepayment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamraphson%2Ftypescript-ravepayment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamraphson%2Ftypescript-ravepayment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamraphson%2Ftypescript-ravepayment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamraphson","download_url":"https://codeload.github.com/iamraphson/typescript-ravepayment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345713,"owners_count":20924098,"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","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":["flutterwave","payment","ravepay","typescript"],"created_at":"2024-10-09T13:08:59.781Z","updated_at":"2025-04-05T13:42:20.040Z","avatar_url":"https://github.com/iamraphson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rave Payment Implementation for typescript\n\nEasy Implementation of RavePay Payment gateway using typescript\n\n### Demo\n![Demo Image](demo1.png?raw=true \"Demo Image\")\n\n#### Installation\n```\nnpm install iamraphson/typescript-ravepayment --save\n```\nor \n```\nyarn add iamraphson/typescript-ravepayment\n```\n\n## Usage\n### ES6\n```\nimport RavePayment from 'typescript-ravepayment'\n\nclass DemoClass {\n    private rave:RavePayment;\n    constructor(){\n        this.rave = new RavePayment(false) // if production, true else false\n    }\n\n    payMe(): void {\n        let raveOption: any =  {\n            PBFPubKey: 'FLWPUBK-xxxxxxxxxxx-X',\n            txref: this.computeReference(),\n            amount: 1000,\n            customer_email: \"FooBar@rave.com\",\n            callback : (response: object) =\u003e this.callback(response),\n            onclose: () =\u003e this.onclose()\n        }\n        this.rave.pay(raveOption)\n    }\n\n     callback(response: object): void {\n        console.log(response)\n    }\n\n     onclose(): void {\n        console.log(\"close\")\n    }\n\n    computeReference () : string {\n        let text = \"\";\n        let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n        for( let i=0; i \u003c 10; i++ )\n            text += possible.charAt(Math.floor(Math.random() * possible.length));\n        return text;\n    }\n}\n```\n[Usage](./demo/more_example/src/app.ts)\n### ES5 / Common.js imports\n```\nlet RavePayment = require('typescript-ravepayment')\n\nclass DemoClass {\n    private rave:any;\n    constructor(){\n        this.rave = RavePayment.Ravepay(true) // if production, true else false\n    }\n\n    payMe(): void {\n        let raveOption: any =  {\n            PBFPubKey: 'FLWPUBK-xxxxxxxxxxx-X',\n            txref: this.computeReference(),\n            amount: 1000,\n            customer_email: \"FooBar@rave.com\",\n            callback : (response: object) =\u003e this.callback(response),\n            onclose: () =\u003e this.onclose()\n        }\n        this.rave.pay(raveOption)\n    }\n\n     callback(response: object): void {\n        console.log(response)\n    }\n\n     onclose(): void {\n        console.log(\"close\")\n    }\n\n    computeReference () : string {\n        let text = \"\";\n        let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n        for( let i=0; i \u003c 10; i++ )\n            text += possible.charAt(Math.floor(Math.random() * possible.length));\n        return text;\n    }\n}\n```\n\n## Deployment\nWHEN DEPLOYING TO PRODUCTION/LIVE SYSTEM, take note of the following;\n1) Pass in `true`  to this function `Ravepay` or constructor`RavePayment`. E.g `RavePayment.Ravepay(true)` or `new RavePayment(true)` \n2) Change RavePay PUBLIC KEY\n\n## Contributing\n1. Fork it!\n2. Create your feature branch: `git checkout -b feature-name`\n3. Commit your changes: `git commit -am 'Some commit message'`\n4. Push to the branch: `git push origin feature-name`\n5. Submit a pull request 😉😉\n\n## How can I thank you?\n\nWhy not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or Any Social Media? Spread the word!\n\nDon't forget to [follow me on twitter](https://twitter.com/iamraphson)!\n\nThanks!\nAyeni Olusegun.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamraphson%2Ftypescript-ravepayment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamraphson%2Ftypescript-ravepayment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamraphson%2Ftypescript-ravepayment/lists"}