pikaju / flutter-braintree

Flutter plugin that wraps the native Braintree SDKs. Enables payments with credit cards, PayPal, Google Pay and more.
https://pub.dev/packages/flutter_braintree
MIT License
64 stars 116 forks source link

Build fails due to Forbidden status from cardinalcommerce #70

Closed reverie-ss closed 2 years ago

reverie-ss commented 3 years ago

Getting this issue in Github Actions pipeline while trying to run the command, flutter build appbundle

Could not determine the dependencies of task ':flutter_braintree:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':flutter_braintree:releaseCompileClasspath'.

   > Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.

     Required by:

         project :flutter_braintree > com.braintreepayments.api:three-d-secure:3.15.0

      > Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.

         > Could not get resource 'https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'.

            > Could not HEAD 'https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'. Received status code 403 from server: Forbidden

I have already added the following to project-level build.gradle

        maven {
            url "https://cardinalcommerce.bintray.com/android"
            credentials {
                username 'braintree-team-sdk@cardinalcommerce'
                password '220cc9476025679c4e5c843666c27d97cfb0f951'
            }
        }

and to app-level build.gradle

implementation ('com.braintreepayments.api:drop-in:5.2.0')
tomk9 commented 3 years ago

Change url, username and password as there https://github.com/braintree/braintree_android/issues/373#issue-873084089

reverie-ss commented 3 years ago

Change url, username and password as there braintree/braintree_android#373 (comment)

I tried, still it's failing! Should I change in the braintree package android/build.gradle as well?

reverie-ss commented 3 years ago

Changing url in the flutter-braintree package worked for me. In flutter-braintree, build.gradle replace the existing credentials to :

    maven {
        url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
        credentials {
            username 'braintree_team_sdk'
            password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
        }
    }
andesappal commented 2 years ago

Changing url in the flutter-braintree package worked for me. In flutter-braintree, build.gradle replace the existing credentials to :

    maven {
        url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
        credentials {
            username 'braintree_team_sdk'
            password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
        }
    }

Storing credentials inside the app is far from ideal. I am also getting a Forbidden status when trying to run my app with your package. Please take a hard look at this issue. Thank you.

andesappal commented 2 years ago

Same issue type

Launching lib/src/main.dart on SM J600GT in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':flutter_braintree:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':flutter_braintree:debugCompileClasspath'.
   > Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.
     Required by:
         project :flutter_braintree > com.braintreepayments.api:three-d-secure:3.15.0
      > Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.
         > Could not get resource 'https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'.
            > Could not GET 'https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'. Received status code 403 from server: Forbidden
      > Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.
         > Could not get resource 'https://google.bintray.com/exoplayer/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'.
            > Could not GET 'https://google.bintray.com/exoplayer/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'. Received status code 403 from server: Forbidden

* 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 2m 10s
Exception: Gradle task assembleDebug failed with exit code 1
andesappal commented 2 years ago

This worked https://developer.paypal.com/braintree/docs/guides/3d-secure/client-side#generate-a-client-token

pikaju commented 2 years ago

I published a new version, 2.0.0, of flutter_braintree, I hope that solves this issue. Sorry for the wait guys.