{"_id":"@capitalsage/ercaspay-react-native-checkout","_rev":"1-2060a8e8f08c897ff1948778896d3394","name":"@capitalsage/ercaspay-react-native-checkout","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.7":{"name":"@capitalsage/ercaspay-react-native-checkout","version":"1.0.7","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/CaptainEboy","name":"CaptainEboy","email":"emaapps.ac24@gmail.com"},"license":"MIT","_id":"@capitalsage/ercaspay-react-native-checkout@1.0.7","maintainers":[{"name":"capitalsagetech","email":"info@capitalsage.ng"},{"name":"w3bh4ck2","email":"l.amadi@capitalsage.ng"}],"homepage":"https://github.com/CaptainEboy/ercaspay/#readme","bugs":{"url":"https://github.com/CaptainEboy/ercaspay/issues"},"dist":{"shasum":"9d7b4b24e9251d74e797ff243334a4bfb4b96449","tarball":"https://registry.npmjs.org/@capitalsage/ercaspay-react-native-checkout/-/ercaspay-react-native-checkout-1.0.7.tgz","fileCount":79,"integrity":"sha512-kxyvn2lm8tbHmJZNHw6KoqQy/gVoR5axv2PNHamLzE2lz+TLvAohU7RmgmgHxMcJ8lLx16QmAAGfByFwQt7Hqw==","signatures":[{"sig":"MEUCIQDscBRatzVA75MjkknL5MgbOo+ZU+w6qvTPEDZ16sODqAIgaChH83n7+Bj/PV7wUGybm73XtwqyQgFVvKRLgmk0WAU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":915986},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/commonjs/index.js","module":"./lib/module/index.js","source":"./src/index.tsx","exports":{".":{"import":{"types":"./lib/typescript/module/src/index.d.ts","default":"./lib/module/index.js"},"require":{"types":"./lib/typescript/commonjs/src/index.d.ts","default":"./lib/commonjs/index.js"}}},"gitHead":"100b1a12496cd3e582ff1d5b30c725578f0d145a","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli lib","example":"yarn workspace react-native-ercaspay-example","prepare":"bob build","release":"release-it","typecheck":"tsc"},"_npmUser":{"name":"w3bh4ck2","email":"l.amadi@capitalsage.ng"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/CaptainEboy/ercaspay.git","type":"git"},"workspaces":["example"],"_npmVersion":"11.0.0","description":"react native expo ercaspay library","directories":{},"resolutions":{"@types/react":"^18.2.44"},"_nodeVersion":"20.18.1","dependencies":{"react-native-config":"^1.5.3","react-native-webview":"^13.12.5","@react-native-community/cli":"^15.1.3","@testing-library/react-native":"^13.0.1"},"eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}],"react/react-in-jsx-scope":"off"},"extends":["@react-native","prettier"]},"eslintIgnore":["node_modules/","lib/"],"codegenConfig":{"name":"RNErcaspaySpec","type":"modules","android":{"javaPackageName":"com.ercaspay"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","react":"18.3.1","eslint":"^8.51.0","del-cli":"^5.1.0","prettier":"^3.0.3","commitlint":"^17.0.2","release-it":"^17.10.0","typescript":"^5.2.2","@types/jest":"^29.5.5","@types/react":"^18.2.44","react-native":"0.76.5","@evilmartians/lefthook":"^1.5.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","react-native-builder-bob":"^0.32.0","@react-native/eslint-config":"^0.73.1","@commitlint/config-conventional":"^17.0.2","@release-it/conventional-changelog":"^9.0.2"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/ercaspay-react-native-checkout_1.0.7_1739415326584_0.7564488049472826","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["codegen",["commonjs",{"esm":true}],["module",{"esm":true}],["typescript",{"esm":true,"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"library","version":"0.45.5","languages":"js"}},"1.0.8":{"name":"@capitalsage/ercaspay-react-native-checkout","version":"1.0.8","description":"react native expo ercaspay library","source":"./src/index.tsx","main":"./lib/commonjs/index.js","module":"./lib/module/index.js","exports":{".":{"import":{"types":"./lib/typescript/module/src/index.d.ts","default":"./lib/module/index.js"},"require":{"types":"./lib/typescript/commonjs/src/index.d.ts","default":"./lib/commonjs/index.js"}}},"scripts":{"example":"yarn workspace react-native-ercaspay-example","test":"jest","typecheck":"tsc","lint":"eslint \"**/*.{js,ts,tsx}\"","clean":"del-cli lib","prepare":"bob build","release":"release-it"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout.git"},"author":{"name":"Capitalsage","url":"https://github.com/capitalsagetechnology"},"license":"MIT","bugs":{"url":"https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout"},"homepage":"https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^17.0.2","@evilmartians/lefthook":"^1.5.0","@react-native/eslint-config":"^0.73.1","@release-it/conventional-changelog":"^9.0.2","@types/jest":"^29.5.5","@types/react":"^18.2.44","commitlint":"^17.0.2","del-cli":"^5.1.0","eslint":"^8.51.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","jest":"^29.7.0","prettier":"^3.0.3","react":"18.3.1","react-native":"0.76.5","react-native-builder-bob":"^0.32.0","release-it":"^17.10.0","typescript":"^5.2.2"},"resolutions":{"@types/react":"^18.2.44"},"peerDependencies":{"react":"*","react-native":"*"},"workspaces":["example"],"packageManager":"yarn@3.6.1","jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native","prettier"],"rules":{"react/react-in-jsx-scope":"off","prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["codegen",["commonjs",{"esm":true}],["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json","esm":true}]]},"codegenConfig":{"name":"RNErcaspaySpec","type":"modules","jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"},"android":{"javaPackageName":"com.ercaspay"}},"create-react-native-library":{"languages":"js","type":"library","version":"0.45.5"},"dependencies":{"@react-native-community/cli":"^15.1.3","@testing-library/react-native":"^13.0.1","react-native-config":"^1.5.3","react-native-webview":"^13.12.5"},"_id":"@capitalsage/ercaspay-react-native-checkout@1.0.8","gitHead":"20b94ed6aaba45a482f45404064d3e4a46c0adc7","_nodeVersion":"20.18.1","_npmVersion":"11.0.0","dist":{"integrity":"sha512-NPWrdkKBtTdg7VlZTbBT4LYZ5g+I80ia0RcHGHkm3YOlHj/ee/A4jFHde+DYTFRo1yALcfr7z6CkqRjXz4oFNA==","shasum":"7a0a971dcad0eeea74351d659187a14c26bca979","tarball":"https://registry.npmjs.org/@capitalsage/ercaspay-react-native-checkout/-/ercaspay-react-native-checkout-1.0.8.tgz","fileCount":79,"unpackedSize":916084,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJN/nOev/hj9CiyRRJAkK1lVIpoUVRiMOnoTSTbl+V7QIgVwFBobyv3hh36sdlFeyPFdJwCm4ECLWLXp3yxZZ6juM="}]},"_npmUser":{"name":"w3bh4ck2","email":"l.amadi@capitalsage.ng"},"directories":{},"maintainers":[{"name":"capitalsagetech","email":"info@capitalsage.ng"},{"name":"w3bh4ck2","email":"l.amadi@capitalsage.ng"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ercaspay-react-native-checkout_1.0.8_1739415673320_0.32519444734862923"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-13T02:55:26.485Z","modified":"2025-02-13T03:01:13.705Z","1.0.7":"2025-02-13T02:55:26.795Z","1.0.8":"2025-02-13T03:01:13.473Z"},"bugs":{"url":"https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout"},"author":{"name":"Capitalsage","url":"https://github.com/capitalsagetechnology"},"license":"MIT","homepage":"https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/capitalsagetechnology/capitalsage-ercaspay-react-native-checkout.git"},"description":"react native expo ercaspay library","maintainers":[{"name":"capitalsagetech","email":"info@capitalsage.ng"},{"name":"w3bh4ck2","email":"l.amadi@capitalsage.ng"}],"readme":"# ercaspay-react-native\n\n#### React Native Expo Ercaspay Library\n\n##### NB: This library currently works on react native expo, it has not yet been tested on react native cli. However, it should work on react native cli. Future updates would be tested on react native cli\n\n######\n\nThis package lets you accept payments with Ercaspay in a snap! Just install, add your keys, and you’re good to go—no headaches here! Plus, it’s officially created at Ercaspay Hackaton 2024, so you know you’re in good hands. Payment processing has never been this easy!\n\n## Screenshot\n\n![Screenshot_1734356084](https://github.com/user-attachments/assets/2d5a0277-8a7c-4b57-9edb-1ee97cf07d4f)\n\n######\n\n## Installation\n\nAdd `react-native-ercaspay` to your project by running;\n\n```bash\nnpm install react-native-ercaspay\n```\n\n## Usage\n\n##### Basic Example\n\n```js\nimport { View, StyleSheet } from 'react-native';\nimport PaymentForm from 'react-native-ercaspay';\n\nconst App = () => {\n  const data = {\n    amount: 100,\n    paymentReference: 'REF-123', //create an algorithm to automatically generate a unique paymentReference for each transaction\n    paymentMethods: 'card,bank-transfer,ussd,qrcode', //do not edit\n    customerName: 'John Doe',\n    customerEmail: 'johndoe@example.com',\n    customerPhoneNumber: '09012345678',\n    redirectUrl: 'https://example.com/success', //A url to direct the user to after payment is successful\n    description: 'Test payment',\n    currency: 'NGN', //do not edit. Other currencies Eg USD would be available in a future update\n    feeBearer: 'customer',\n    metadata: {\n      firstname: 'John',\n      lastname: 'Doe',\n      email: 'johndoe@example.com',\n    },\n    secretKey: 'add-your-secret-key-here', //Your secret key(visit https://ercaspay.com/ to get yours)\n  };\n\n  return (\n    <View style={styles.container}>\n      <PaymentForm\n        amount={data.amount}\n        paymentReference={data.paymentReference}\n        paymentMethods={data.paymentMethods}\n        customerName={data.customerName}\n        customerEmail={data.customerEmail}\n        customerPhoneNumber={data.customerPhoneNumber}\n        redirectUrl={data.redirectUrl}\n        description={data.description}\n        currency={data.currency}\n        feeBearer={data.feeBearer}\n        metadata={data.metadata}\n        secretKey={data.secretKey}\n      />\n    </View>\n  );\n};\n\nexport default App;\n\nconst styles = StyleSheet.create({\n  container: {\n    marginTop: 50,\n    flex: 1,\n  },\n});\n```\n\n## API Reference\n\n| Name               | Description                                                                                                                                                      |\n| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount`           | Can be any number. - **`should not be less than 100Naira for NGN`**:                                                                                             |\n| `paymentReference` | Must be unique - **`create an algorithm to automatically generate a unique paymentReference for each transaction`**:                                             |\n| `paymentMethods`   | Should be constant don't edit it **`card,bank-transfer,ussd,qrcode`**:                                                                                           |\n| `currency`         | **`Defaults to NGN`**: USD and other currencies would be provided in future updates, please raise as issue if you need other currencies                          |\n| `redirectUrl`      | - **`A url to direct the user to after payment is successful`**:                                                                                                 |\n| `feeBearer`        | - **`Defaults to Customer`**: Should be constant don't edit it, transaction fees would be added to customers. please raise as issue if you want to incur the fee |\n| `secretKey`        | - **`Your secret key(visit https://ercaspay.com/ to get yours)`**:                                                                                               |\n|                    |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","readmeFilename":"README.md"}