{"id":4765,"url":"https://github.com/surialabs/react-native-braintree-android","last_synced_at":"2025-08-04T02:31:38.194Z","repository":{"id":57148195,"uuid":"47818988","full_name":"surialabs/react-native-braintree-android","owner":"surialabs","description":"A react native interface for integrating Braintree's native Drop-in Payment UI for Android","archived":false,"fork":false,"pushed_at":"2016-10-13T06:55:01.000Z","size":11,"stargazers_count":25,"open_issues_count":4,"forks_count":11,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-11-14T02:50:16.503Z","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/surialabs.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}},"created_at":"2015-12-11T10:00:31.000Z","updated_at":"2023-11-21T02:39:42.000Z","dependencies_parsed_at":"2022-09-05T16:51:13.258Z","dependency_job_id":null,"html_url":"https://github.com/surialabs/react-native-braintree-android","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surialabs%2Freact-native-braintree-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surialabs%2Freact-native-braintree-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surialabs%2Freact-native-braintree-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surialabs%2Freact-native-braintree-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surialabs","download_url":"https://codeload.github.com/surialabs/react-native-braintree-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228587347,"owners_count":17941442,"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":[],"created_at":"2024-01-05T20:17:22.612Z","updated_at":"2024-12-07T09:30:57.729Z","avatar_url":"https://github.com/surialabs.png","language":"Java","funding_links":[],"categories":["Components"],"sub_categories":["Integrations"],"readme":"# react-native-braintree-android\n\nA react native interface for integrating Braintree's native Drop-in Payment UI for Android using [Braintree's v.zero SDK](https://developers.braintreepayments.com/start/overview).\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/503385/11742042/dc4eeaa8-a037-11e5-80ef-549a5f749282.png\" alt=\"Screenshot\" width=\"300\" /\u003e\n\n## Setup\n\n1. Add Braintree to your React Native project\n\n```\nnpm install --save react-native-braintree-android\n```\n\n2. Add the following to android/settings.gradle\n\n```java\ninclude ':react-native-braintree'\nproject(':react-native-braintree').projectDir = new File(settingsDir, '../node_modules/react-native-braintree-android')\n```\n\n3. Add the following to android/app/build.gradle\n\n```java\ndependencies {\n  // ...\n  compile project(':react-native-braintree')\n}\n```\n\n4. Edit android/src/.../MainApplication.java\n\n```java\n// ...\nimport com.surialabs.rn.braintree.BraintreePackage; // \u003c--\nimport android.content.Intent; // \u003c--\n\npublic class MainApplication extends Application implements ReactApplication {\n\n  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n    @Override\n    protected boolean getUseDeveloperSupport() {\n      return BuildConfig.DEBUG;\n    }\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n          new MainReactPackage(),\n\t\t\t\t\tnew BraintreePackage()\n      );\n    }\n\n  };\n\n  @Override\n  public ReactNativeHost getReactNativeHost() {\n      return mReactNativeHost;\n  }\n}\n```\n\n## Usage\n\n```js\n\nimport Braintree from 'react-native-braintree-android';\n\nclass Payment extends Component {\n  ...\n\n  componentDidMount() {\n    Braintree.setup(CLIENT_TOKEN)\n  }\n\n  _paymentInit() {\n    Braintree.showPaymentViewController().then((nonce) =\u003e {\n      // Do something with nonce\n    });\n  }\n\n  ...\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurialabs%2Freact-native-braintree-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurialabs%2Freact-native-braintree-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurialabs%2Freact-native-braintree-android/lists"}