#Chocacao-payment-method
1 messages ยท Page 1 of 1 (latest)
This is a big issue because I don't know then how to set the payement method for my PaymentIntent
Hi there ๐ could you help me understand what you're trying to do?
I'm trying to create the payement intent server side
for that I am using
`PaymentMethodListParams listParams = new PaymentMethodListParams.Builder().setCustomer(customer.getId())
.setType(PaymentMethodListParams.Type.CARD).build();
PaymentMethodCollection paymentMethods = PaymentMethod.list(listParams);
PaymentIntentCreateParams paymentIntentParams =
PaymentIntentCreateParams.builder()
.setAmount((long) ticketDAO.getTicketById(id).getPrice())
.setCurrency("eur")
.setCustomer(customer.getId())
.setPaymentMethod(paymentMethods.getData().get(0).getId())
.build();
PaymentIntent paymentIntent = PaymentIntent.create(paymentIntentParams);`
but the problem is that paymentMethods.getData() is empty, however in the stripe logs I can clearly see a success on creating a payement method
Do you happen to have the request ID for the PaymentMethod.list function?
req_3eMpgPGsxk5c4Z
Thanks, taking a look
thank you
I'm struggling to find a request for your account that created a payment method, would you happen to have the request ID for that as well?
I'm sorry isn't that what you are asking for ?
Ok I managed to create the paiement intent and set the paiement method through another function
thank you for your help
I'm ok server side, now I'm going to bother you with client side ... May I ?
So here is the big issue, I am working on Android Studio. Added implementation 'com.stripe:stripe-android:18.1.0' in the gradle dependencies.
BUT private PaymentSheet paymentSheet; creates the error Cannot resolve symbol 'PaymentSheet'. This means it cannot be found in the sdk, and even with import com.stripe.android.paymentsheet.*; the import is never used.
I synced with gradle files, reloaded the project and everything but still nothing
I have PaymentOptionsViewModel_Factory or even some things like PaymentSheetLauncherModule_Companion_ProvideProductUsageTokensFactory, but the one PaymentSheet is like a ghost !
Thanks for the info, please bear with me while I consult with my colleagues.
Take your time, I will porovide any ressource you ask of me.
Apologies for the delay.
Could you confirm the location of your gradle file?
OK the file is here, whenever I go there it says : // This class file was compiled with different version of Kotlin compiler and can't be decompiled. // // Current compiler ABI version is 1.1.16 // File ABI version is 1.5.1
So I guess I have to update my Kotlin Compiler
And now it works
Wooh! Not sure what fixed it, but I'm excited all the same.
Well your file was compiled in a version way too new for my compiler to understand. That's pretty much it ! thanks for all your help !