Skip to content

Commit

Permalink
shouldValidateCard added to onCardPress on Android, README.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
arpanzap committed Dec 14, 2021
1 parent aa55c5d commit d4126fc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ npm install rn-braintree-one --save

allprojects {
repositories {
mavenLocal()
maven {
url "https://cardinalcommerce.bintray.com/android"
credentials {
username 'braintree-team-sdk@cardinalcommerce'
password '220cc9476025679c4e5c843666c27d97cfb0f951'
}
}
mavenLocal()
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
...
}
}

### Post Install
#### Run
Expand Down
4 changes: 3 additions & 1 deletion android/src/main/java/com/rnbraintree/RnBraintreeModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ class RnBraintreeModule(reactContext: ReactApplicationContext) : ReactContextBas
}
this.promise = promise
val cardBuilder = CardBuilder()
.validate(true)
.validate(false)

if (parameters.hasKey("shouldValidateCard")) cardBuilder.validate(parameters.getBoolean("shouldValidateCard"))
if (parameters.hasKey("number")) cardBuilder.cardNumber(parameters.getString("number"))
if (parameters.hasKey("cvv")) cardBuilder.cvv(parameters.getString("cvv"))

Expand Down
10 changes: 5 additions & 5 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ allprojects {
repositories {
mavenLocal()
maven {
url "https://cardinalcommerce.bintray.com/android"
credentials {
username 'braintree-team-sdk@cardinalcommerce'
password '220cc9476025679c4e5c843666c27d97cfb0f951'
}
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}

maven {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rn-braintree-one",
"version": "0.1.10",
"version": "1.0.0",
"description": "This package provides latest iOS and Android Braintree SDK support for React Native.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit d4126fc

Please sign in to comment.