1

I am trying to enable Samsung Pay within My Braintree Sandbox Payment Gateway. I update my processing settings in my Braintree sandbox dashboard and As Per This Link update my module-level build.gradle file

apply plugin: 'com.android.application'

android {
  compileSdkVersion 27
  defaultConfig {
    applicationId "com.android.testparseapplication"
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  // BRAINTREE API
  implementation 'com.braintreepayments.api:drop-in:3.6.0'
  // Samsung Pay -- Api >= 23
  implementation 'com.braintreepayments.api:braintree:2.16.0'
  implementation 'com.braintreepayments.api:samsung-pay:1.0.0'
  // Samsung JAR to libs folder of project
  implementation(group: 'com.samsung.android', name: 'samsungpay', version: '1.9.0', ext: 'jar') <---- PRODUCES ERROR
}

repositories {
  mavenCentral()
  jcenter()
  maven {
    url "https://maven.google.com"
  }
  flatDir {
    dirs "${rootDir}/libs"
  }
}

apply plugin: 'com.google.gms.google-services'

However End With The Error: Failed to resolve: com.samsung.android:samsungpay:1.9.0

Any recommendations ?

  • Do you add `samsungpay` jar file in your `libs` directory? – Rutvik Bhatt Nov 19 '18 at 07:53
  • I have NOT moved/added a jar file in my libs dir, I thought that the gradle directives mentioned in my question were for that purpose ? @RutvikBhatt – Alyosha_Karamazov Nov 19 '18 at 21:52
  • as per [this](https://developers.braintreepayments.com/guides/samsung-pay/client-side/android/v2#samsung-pay) link you need to add samsungpay jar file in libs directory – Rutvik Bhatt Nov 20 '18 at 03:56
  • @RutvikBhatt do you mean download the Samsung sdk from [Here](https://developer.samsung.com/galaxy/getting-started) ? and then uploading it to my libs directory ? Braintree Docs don't specify where to get the jar file... – Alyosha_Karamazov Nov 21 '18 at 02:58
  • what can I do in this case? – Rutvik Bhatt Nov 21 '18 at 03:57

0 Answers0