{"id":29023007,"url":"https://github.com/bamlab/react-native-braintree-payments-drop-in","last_synced_at":"2025-06-26T03:04:57.702Z","repository":{"id":45250714,"uuid":"123450599","full_name":"bamlab/react-native-braintree-payments-drop-in","owner":"bamlab","description":"React Native integration of Braintree Drop-in","archived":false,"fork":false,"pushed_at":"2023-02-23T14:36:01.000Z","size":25,"stargazers_count":35,"open_issues_count":15,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-02T10:46:47.872Z","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/bamlab.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":"2018-03-01T15:06:13.000Z","updated_at":"2022-04-26T04:49:53.000Z","dependencies_parsed_at":"2022-08-30T10:21:36.867Z","dependency_job_id":null,"html_url":"https://github.com/bamlab/react-native-braintree-payments-drop-in","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/bamlab/react-native-braintree-payments-drop-in","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Freact-native-braintree-payments-drop-in","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Freact-native-braintree-payments-drop-in/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Freact-native-braintree-payments-drop-in/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Freact-native-braintree-payments-drop-in/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bamlab","download_url":"https://codeload.github.com/bamlab/react-native-braintree-payments-drop-in/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamlab%2Freact-native-braintree-payments-drop-in/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990349,"owners_count":23241188,"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":"2025-06-26T03:04:57.174Z","updated_at":"2025-06-26T03:04:57.689Z","avatar_url":"https://github.com/bamlab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-braintree-payments-drop-in\n\n\u003e React Native integration of Braintree Drop-in\n\n## Getting started\n\n```bash\nyarn add react-native-braintree-payments-drop-in\n```\n\n### Mostly automatic installation\n\n```bash\n# Run this only if you are on RN \u003c 0.60\nreact-native link react-native-braintree-payments-drop-in\n```\n\n#### iOS specific\n\nYou must have a iOS deployment target \u003e= 9.0.\n\nIf you don't have a Podfile or are unsure on how to proceed, see the [CocoaPods](http://guides.cocoapods.org/using/using-cocoapods.html) usage guide.\n\nIn your `Podfile`, add:\n\n```\n# uncomment the next line if you are on RN \u003c 0.60\n#pod 'BraintreeDropIn', '~\u003e 6.0'\n\n# uncomment the next line to support credit card scanning\n# pod 'CardIO'\n```\n\nThen:\n\n```bash\ncd ios\nbundle exec pod repo update # optional and can be very long\nbundle exec pod install\n```\n\n#### Android specific\n\nIf you want to add card scanning, add in your `app/build.gradle`:\n\n```\ndependencies {\n...\n    implementation \"io.card:android-sdk:5.+\"\n```\n\n### Configuration\n\nFor more configuration options, see Braintree's documentation ([iOS](https://github.com/braintree/braintree-ios-drop-in) | [Android](https://github.com/braintree/braintree-android-drop-in)).\n\n#### 3D Secure\n\nIf you plan on using 3D Secure, you have to do the following.\n\n##### iOS\n\n###### Configure a new URL scheme\n\nAdd a bundle url scheme `{BUNDLE_IDENTIFIER}.payments` in your app Info via XCode or manually in the `Info.plist`.\nIn your `Info.plist`, you should have something like:\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eCFBundleTypeRole\u003c/key\u003e\n        \u003cstring\u003eEditor\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLName\u003c/key\u003e\n        \u003cstring\u003ecom.myapp\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n        \u003carray\u003e\n            \u003cstring\u003ecom.myapp.payments\u003c/string\u003e\n        \u003c/array\u003e\n    \u003c/dict\u003e\n\u003c/array\u003e\n```\n\n###### Update your code\n\nIn your `AppDelegate.m`:\n\n```objective-c\n#import \"BraintreeCore.h\"\n\n...\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    ...\n    [BTAppSwitch setReturnURLScheme:self.paymentsURLScheme];\n}\n\n- (BOOL)application:(UIApplication *)application\n            openURL:(NSURL *)url\n            options:(NSDictionary\u003cUIApplicationOpenURLOptionsKey,id\u003e *)options {\n\n    if ([url.scheme localizedCaseInsensitiveCompare:self.paymentsURLScheme] == NSOrderedSame) {\n        return [BTAppSwitch handleOpenURL:url options:options];\n    }\n    \n    return [RCTLinkingManager application:application openURL:url options:options];\n}\n\n- (NSString *)paymentsURLScheme {\n    NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];\n    return [NSString stringWithFormat:@\"%@.%@\", bundleIdentifier, @\"payments\"];\n}\n```\n\n##### Android\n\nSetup [browser switch](https://developers.braintreepayments.com/guides/client-sdk/setup/android/v2#browser-switch-setup).\n\n\n## Usage\n\nFor the API, see the [Flow typings](./index.js.flow).\n\n### Basic\n\n```javascript\nimport BraintreeDropIn from 'react-native-braintree-payments-drop-in';\n\nBraintreeDropIn.show({\n  clientToken: 'token',\n})\n.then(result =\u003e console.log(result))\n.catch((error) =\u003e {\n  if (error.code === 'USER_CANCELLATION') {\n    // update your UI to handle cancellation\n  } else {\n    // update your UI to handle other errors\n  }\n});\n```\n\n### 3D Secure\n\n```javascript\nimport BraintreeDropIn from 'react-native-braintree-payments-drop-in';\n\nBraintreeDropIn.show({\n  clientToken: 'token',\n  threeDSecure: {\n    amount: 1.0,\n  },\n})\n.then(result =\u003e console.log(result))\n.catch((error) =\u003e {\n  if (error.code === 'USER_CANCELLATION') {\n    // update your UI to handle cancellation\n  } else {\n    // update your UI to handle other errors\n    // for 3D secure, there are two other specific error codes: 3DSECURE_NOT_ABLE_TO_SHIFT_LIABILITY and 3DSECURE_LIABILITY_NOT_SHIFTED\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamlab%2Freact-native-braintree-payments-drop-in","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbamlab%2Freact-native-braintree-payments-drop-in","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamlab%2Freact-native-braintree-payments-drop-in/lists"}