ekreative / react-native-braintree Goto Github PK
View Code? Open in Web Editor NEWA react native interface for integrating payments using Braintree
Home Page: https://github.com/ekreative/react-native-braintree
A react native interface for integrating payments using Braintree
Home Page: https://github.com/ekreative/react-native-braintree
May I please ask for the updated credentails for https://cardinalcommerceprod.jfrog.io/artifactory/android
since the credentials provided is returning a wrong/locked user account. Thanks!
hi, when using BTAppSwitch in my AppDelegate.m, I am getting undeclared identifier 'BTAppSwitch'
, and build fails.
Did I miss a step?
[Error: PayPal is not enabled. See https://developer.paypal.com/braintree/docs/guides/paypal/overview/android/v4 for more information.]
Hi all,
while executing the run3DSecureCheck function, we got this error:
[Error: {"error":{"message":"Record not found"},"fieldErrors":[]}]
How to reproduce it:
RNBraintree.run3DSecureCheck({
clientToken: 'CLIENT_TOKEN_GENERATED_ON_SERVER_SIDE', -> we replaced the clientToken here
nonce: 'CARD_NONCE',
amount: '122.00',
email: '[email protected]',
firstname: '',
lastname: '',
phoneNumber: '',
streetAddress: '',
streetAddress2: '',
city: '',
region: '',
postalCode: '',
countryCode: ''
})
.then(result => console.log(result))
.catch((error) => console.log(error));
To increase the popularity of the library, add the following links to the documentation:
TODO:
🇺🇦
Add the table with Native SDK versions for all react-native-braintree releases with changed version
For example:
Package Version | Android SDK | iOS SDK |
---|---|---|
1.0.0 | x.y.z | x.y.z |
https://prettier.io/ (without eslint integration)
Hi,
We are using the latest version of the @ekreative/react-native-braintree in our app. I recently submitted a build of an app to Google Play Store. The app got rejected giving the following reason:
**Issue found: Violation of User Data policy
We reviewed SDKs used by your app and found noncompliant version(s) of SDK(s) which collects persistent device identifiers. Persistent device identifiers may not be linked to other personal and sensitive user data or resettable device identifiers.
Issue details
We found an issue in the following area(s):
SPLIT_BUNDLE 28: :
SDK: Braintree Payments com.braintreepayments.api:data-collector (consider upgrading to version 4.31.0)
Additionally, follow these steps to bring your app into compliance:
You may consider upgrading to a policy-compliant version of this SDK, if available from your SDK provider or removing the SDK.**
I've been submitting builds for this app for the last 18 months without issue until this week where it's been rejected. The User Data Policy on Google Play store had been updated recently.
Is there any way to upgrade the plugin to use version 4.31.0 of com.braintreepayments.api:data-collector as suggested?
Thanks
Error with pod install
CocoaPods could not find compatible versions for pod "Braintree/ApplePay":
In Podfile:
react-native-braintree (from ../node_modules/@ekreative/react-native-braintree
) was resolved to 2.5.0, which depends on
Braintree/ApplePay
when ever I run the following code nothing happens
RNBraintree.runGooglePay({
clientToken:token,
amount: '100.0',
currencyCode: 'EUR'
})
.then(result => console.log(result))
.catch((error) => console.log(error));
.
TypeError: Cannot read property 'showPayPalModule' of null, js engine: hermes
got this issue in while import RNBraintree application is crashing
Can someone please post the UI of this plugin in the readme desc, so we could know it without installing it?
In stage environment the apple pay and google pay is working but in production both of them are not. Can someone explain to me what else i should do to enable them;
I have enable the options in my braintree panel and i have perform the steps for the ios certification files..
Google play is throwing an OR_BIBED_11 error and apple pay is throwing an error unable to decrypt.
can someone help? maybe some instructions or links how to enable these payments?
No response
Configured project on a React Native App (not expo). Working well processing payments.
During testing found that opening the Apple Pay prompt then navigating away from our app (switching apps or just going to the home screen) causes the app to crash.
Versions:
"@ekreative/react-native-braintree": "^2.5.0"
"react": "18.2.0"
"react-native": "0.72.4"
Stack trace:
Crashed: com.apple.main-thread
0 lousrnRelease 0x4d19ac -[RNBraintreeApplePay paymentAuthorizationViewControllerDidFinish:] + 114 (RNBraintreeApplePay.m:114)
1 PassKitUI 0x9f8ee4 __81-[PKPaymentAuthorizationViewController paymentAuthorizationCoordinatorDidFinish:]_block_invoke + 56
2 libdispatch.dylib 0x213c _dispatch_call_block_and_release + 32
3 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20
4 libdispatch.dylib 0x125a4 _dispatch_main_queue_drain + 988
5 libdispatch.dylib 0x121b8 _dispatch_main_queue_callback_4CF + 44
6 CoreFoundation 0x56710 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
7 CoreFoundation 0x53914 __CFRunLoopRun + 1996
8 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
9 GraphicsServices 0x11a8 GSEventRunModal + 164
10 UIKitCore 0x40a90c -[UIApplication _run] + 888
11 UIKitCore 0x4be9d0 UIApplicationMain + 340
12 redacted 0xaaa0 main + 8 (main.m:8)
13 ??? 0x1b95dde4c (Missing)
Add unit testing for JS files
Add shared mocks (for example https://github.com/software-mansion/react-native-reanimated/blob/main/mock.js)
The current iOS code base is written on Objective-C. Will be good to fresh this code using the new iOS language standard.
I need to implement Apple Pay in a Project React Native 0.62.2 in Xcode Version 13.2.1 (13C100)
And I get this error:
No visible @interface for 'BTDataCollector' declares the selector 'collectDeviceData:'
how can I solve it? Thanks!!
Hi,
I hope you're doing well! Firstly, thank you for maintaining such an awesome library. I've been using it in my projects and it's been really helpful.
I'm curious to know if there are any plans to update to iOS SDK Version 6 in the near future. It would be great to hear your thoughts on this.
Thanks again for your work on this project!
Cheers!
Use a popular standard for config, for example https://danielkummer.github.io/git-flow-cheatsheet/index.uk_UA.html
Example tools:
▸ Compiling react-native-braintree-dummy.m
▸ Compiling RNBraintreeApplePay.m
▸ Compiling RNBraintree.m
❌ /Users/boblin/Desktop/WorkSpace/ReactNative/ignite/moon/node_modules/@ekreative/react-native-braintree/ios/RNBraintree.m:2:9: 'BraintreeCore.h' file not found
#import "BraintreeCore.h"
"react": "18.0.0",
"react-native": "0.69.6",
"@ekreative/react-native-braintree": "^1.3.0",
The current android code base is written on Java. Will be good to fresh this code using the new android language standard.
The current version is v14 but this version is deprecated.
Please, do investigate what we can break.
Will be good to have automatic release without manual boring work
I have no problem with iOS emulator, but if I try to run .run3DSecureCheck
on an android device it doesn't show anything.
I followed the instruction to install the module correctly with both the systems.
Is there something I am missing? Maybe I have to change the credentials for maven url https://cardinalcommerceprod.jfrog.io/artifactory/android ?
Seems like at the moment the data collector doesn't accept custom properties such as passing things like riskCorrelationId.
It would be great if custom properties could be passed when creating the data collector and obtaining the device data.
Thanks!
Hi, i'm using your library witj expo react and that not work.
I show you the error:
TypeError: null is not an object (evaluating 'RNBraintree.showPayPalModule') at node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError at node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl at node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error at node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException at node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError at node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0 at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch at node_modules\regenerator-runtime\runtime.js:293:29 in invoke at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch at node_modules\regenerator-runtime\runtime.js:154:27 in invoke at node_modules\regenerator-runtime\runtime.js:164:18 in PromiseImpl.resolve.then$argument_0 at node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne at node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0 at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0 at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue at [native code]:null in flushedQueue at [native code]:null in invokeCallbackAndReturnFlushedQueue
Docs https://reactnative.dev/docs/new-architecture-intro
Take examples from popular libraries https://reactnative.directory/?newArchitecture=true
Android example https://github.com/alabsi91/react-native-material-you-colors/tree/main/android/src
Issue code
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDevelopmentDebugResources'.
> Could not resolve all task dependencies for configuration ':app:developmentDebugRuntimeClasspath'.
> Could not find org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.7-2.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://repo.maven.apache.org/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- file:/Users/*****/projects/*****/node_modules/jsc-android/dist/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://dl.google.com/dl/android/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://www.jitpack.io/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
Required by:
project :app > project :ekreative_react-native-braintree > com.braintreepayments.api:three-d-secure:4.27.2
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDevelopmentDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDevelopmentDebugResources'.
> Could not resolve all task dependencies for configuration ':app:developmentDebugRuntimeClasspath'.
> Could not find org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.7-2.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://repo.maven.apache.org/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- file:/Users/*****/projects/*****/node_modules/jsc-android/dist/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://dl.google.com/dl/android/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
- https://www.jitpack.io/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.7-2/cardinalmobilesdk-2.2.7-2.pom
Required by:
project :app > project :ekreative_react-native-braintree > com.braintreepayments.api:three-d-secure:4.27.2
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
react-native info
System:
OS: macOS 13.3.1
CPU: (12) arm64 Apple M2 Pro
Memory: 59.53 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
Yarn: 1.22.10 - /opt/homebrew/bin/yarn
npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
Watchman: 2023.06.12.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.11 => 0.71.11
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://www.jitpack.io" }
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
For now, CI/CD is working without a cache. So, each time it installs node_modules even if there are no changes made.
There is a cache option in setup-node action so we can turn on it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.