paypal / android-checkout-sdk

Apache License 2.0
77 stars 38 forks source link

cardinalmobilesdk-2.2.4-1 Received status code 502 from server: Bad Gateway #113

Closed yanhui11 closed 2 years ago

yanhui11 commented 2 years ago

introduce resource repositories { mavenCentral() maven { url "https://cardinalcommerceprod.jfrog.io/artifactory/android" credentials { // Be sure to add these non-sensitive credentials in order to retrieve dependencies from // the private repository. username 'paypal_sgerritz' password 'AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ' } } } Compilation error Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not HEAD 'https://dl.bintray.com/thelasterstar/maven/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom'. Received status code 502 from server: Bad Gateway

tdchow commented 2 years ago

Hey @yanhui11 - Can you share your project's root build.gradle file? It looks like you're trying to look for the Cardinal dependency in jfrog's bintray which has been deprecated.

yanhui11 commented 2 years ago

@tdchow this is my project`s root build.gradle file

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        maven { url 'https://jitpack.io' }
        maven { url 'https://repo1.maven.org/maven2/' }
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url "https://dl.bintray.com/thelasterstar/maven/" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.github.Meituan-Dianping.walle:plugin:v1.1.7'
        classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.21'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.google.com' }
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' }
        maven { url 'https://repo1.maven.org/maven2/' }
        maven { url "https://dl.bintray.com/thelasterstar/maven/" }
        maven {
            url  "https://cardinalcommerceprod.jfrog.io/artifactory/android"
            credentials {
                // Be sure to add these non-sensitive credentials in order to retrieve dependencies from
                // the private repository.
                username 'paypal_sgerritz'
                password 'AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ'
            }
        }
    }
}
tdchow commented 2 years ago

@yanhui11 - Can you try removing maven { url "https://dl.bintray.com/thelasterstar/maven/" } from both buildscript->repositories and allprojects->repositories? I'm seeing a 502 for this maven repo. Since you have it defined above the cardinal maven repository, it may be throwing the 502 error before gradle tries to get the dependency from https://cardinalcommerceprod.jfrog.io/artifactory/android.

yanhui11 commented 2 years ago

Thank you, the problem has been solved.

yanhui11 commented 2 years ago

now I call the payment API. Prompt: this operation does not seem to be supported. Please return and report the error so that we can provide support for you in the future. (invalid range)

tdchow commented 2 years ago

@yanhui11 - Glad your first issue was resolved. Can you please share the entire error that you're seeing for the payment API?

tdchow commented 2 years ago

Hey @yanhui11 - I'm going to go ahead and close this issue out as your initial issue was resolved. Feel free to open a new issue if you're still seeing issues with the one of the APIs. Thanks!

yanhui11 commented 2 years ago

aadd06c61ec0914b25242f5fb580db0 sandbox mode call api PayPalCheckout.start()