stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.26k stars 640 forks source link

Type parameter 'com.stripe.android.PaymentIntentResult' is not within its bound; should extend 'com.stripe.android.model.StripeModel' #2957

Closed 95DBC closed 3 years ago

95DBC commented 3 years ago

Summary

Type parameter 'com.stripe.android.PaymentIntentResult' is not within its bound; should extend 'com.stripe.android.model.StripeModel'

Code to reproduce

private static final class PaymentResultCallback
            implements ApiResultCallback<PaymentIntentResult> {

        @Override
        public void onSuccess(@NonNull PaymentIntentResult result) {
            PaymentIntent paymentIntent = result.getIntent();
            PaymentIntent.Status status = paymentIntent.getStatus();
            if (status == PaymentIntent.Status.Succeeded) {
                // Payment succeeded
            } else {
                // Payment failed/cancelled
            }
        }

        @Override
        public void onError(@NonNull Exception e) {
            // Payment failed
        }
    }

Android version

Android 10

Impacted devices

Pixel 3

SDK version

implementation 'com.stripe:stripe-android:16.0.1' implementation(name:"alipaySdk-15.5.9-20181123210601", ext:"aar")

Other information

When I use the official example, I keep reminding me of this problem. Type parameter 'com.stripe.android.PaymentIntentResult' is not within its bound; should extend 'com.stripe.android.model.StripeModel'

mshafrir-stripe commented 3 years ago

@95DBC I can't reproduce this issue. Where are you seeing that message? A screenshot would help.

95DBC commented 3 years ago

I can't reproduce this issue. Where are you seeing that message? A screenshot would help.

https://stripe.com/docs/payments/alipay/accept-a-payment This is the official example. https://github.com/95DBC/test_img/blob/master/app/src/main/res/drawable/1.png This is my problem.

mshafrir-stripe commented 3 years ago

@95DBC I can't reproduce this issue. It might be based on some IDE setting you've enabled?

Screen Shot 2020-10-23 at 10 16 52 AM
mshafrir-stripe commented 3 years ago

Closing - can't reproduce.