{"id":18369117,"url":"https://github.com/bitfancy/nfc-payment","last_synced_at":"2025-09-03T13:10:09.338Z","repository":{"id":240158275,"uuid":"797929952","full_name":"BitFancy/nfc-payment","owner":"BitFancy","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-08T19:01:36.000Z","size":423,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T21:16:52.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/BitFancy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-05-08T18:54:41.000Z","updated_at":"2024-10-26T20:13:46.000Z","dependencies_parsed_at":"2024-05-17T03:01:15.183Z","dependency_job_id":"f8bf7e2e-b39f-43c1-a43d-9c5904080ff7","html_url":"https://github.com/BitFancy/nfc-payment","commit_stats":null,"previous_names":["bitfancy/nfc-payment"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/BitFancy/nfc-payment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Fnfc-payment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Fnfc-payment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Fnfc-payment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Fnfc-payment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitFancy","download_url":"https://codeload.github.com/BitFancy/nfc-payment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Fnfc-payment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273447485,"owners_count":25107371,"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-09-03T02:00:09.631Z","response_time":76,"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-05T23:28:30.602Z","updated_at":"2025-09-03T13:10:09.266Z","avatar_url":"https://github.com/BitFancy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-nfc-payment\n\nA React Native module that allows you to receive payments with nfc.\n\nThis package will only work on Android and isn't available for iOS as of 2020 because Apple do not allow 3rd party iPhone apps to use the Core NFC framework.\n\n## Installation\n\n```sh\nnpm install react-native-nfc-payment\n```\n\n### Android\n\nSimple add `uses-permission` into your `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.NFC\" /\u003e\n\u003cuses-permission android:name=\"android.permission.VIBRATE\" /\u003e\n```\n\n### Methods\n\n| Method               | Description                     |\n| -------------------- | ------------------------------- |\n| `registerTagEvent`   | `Start the nfc reading process` |\n| `unregisterTagEvent` | `Close the nfc reading process` |\n\n### Options\n\n| Method                 | Description                                        | Default |\n| ---------------------- | -------------------------------------------------- | ------- |\n| `contactLess`          | `Enable contact less reading`                      | `true`  |\n| `readAllAids`          | `Read all aids in card`                            | `true`  |\n| `readTransactions`     | `Read all transactions`                            | `true`  |\n| `removeDefaultParsers` | `Remove default parsers for GeldKarte and EmvCard` | `false`  |\n| `readAt`               | `Read and extract ATR/ATS and description`         | `true`  |\n\n## Usage / Example\n\n```javascript\nimport { useEffect, useState } from \"react\";\nimport { StyleSheet, Text, TouchableOpacity, View } from \"react-native\";\nimport {\n  registerTagEvent,\n  unregisterTagEvent,\n  type INfcModuleConfig,\n  type INfcCardInfo,\n} from \"react-native-nfc-payment\";\n\nexport default function App() {\n  const [cardInfos, setCardInfos] = useState\u003cINfcCardInfo | null\u003e(null);\n\n  useEffect(() =\u003e {\n    onRegisterTagEvent();\n    return () =\u003e {\n      onUnregisterTagEvent();\n    };\n  }, []);\n\n  const onRegisterTagEvent = async () =\u003e {\n    try {\n      var options: INfcModuleConfig = {\n        contactLess: true,\n        readAllAids: true,\n        readTransactions: true,\n        removeDefaultParsers: false,\n        readAt: true,\n      };\n      const result = await registerTagEvent(options);\n      console.log(\"unregisterTagEvent::result\", JSON.parse(result));\n    } catch (error) {\n      console.log(\"error\", error);\n    }\n  };\n\n  const onUnregisterTagEvent = async () =\u003e {\n    try {\n      const result = await unregisterTagEvent();\n      console.log(\"unregisterTagEvent::result\", result);\n    } catch (error) {\n      console.log(\"error\", error);\n    }\n  };\n\n  return (\n    \u003cView style={styles.container}\u003e\n      \u003cTouchableOpacity style={styles.buttonStyle} onPress={onRegisterTagEvent}\u003e\n        \u003cText\u003eRegister Tag Event\u003c/Text\u003e\n      \u003c/TouchableOpacity\u003e\n      \u003cTouchableOpacity style={styles.buttonStyle} onPress={onUnregisterTagEvent}\u003e\n        \u003cText\u003eUnregister Tag Event\u003c/Text\u003e\n      \u003c/TouchableOpacity\u003e\n    \u003c/View\u003e\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: \"center\",\n    paddingHorizontal: 30,\n  },\n  buttonStyle: {\n    padding: 10,\n    backgroundColor: \"#ddd\",\n    borderRadius: 40,\n    alignItems: \"center\",\n    marginBottom: 20,\n  },\n});\n\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## Acknowledgements\nThanks to the authors of these libraries for inspiration:\n\n\n\n- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n- [EMV-NFC-Paycard-Enrollment](https://github.com/devnied/EMV-NFC-Paycard-Enrollment)\n\n\n## License\n\nMIT\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfancy%2Fnfc-payment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitfancy%2Fnfc-payment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfancy%2Fnfc-payment/lists"}