#nweibin2000 - Payment Sheet
1 messages · Page 1 of 1 (latest)
Hello! Pulling context into this thread:
I'm using the Java for front-end and the back end is Node then implement in Android Studio
Can you provide more details? What's the problem you're facing exactly?
@waxen elbow Seem like the library did not involve the payment sheet then I have implemented the version to com.stripe:stripe-android:14.4.0
Yep, PaymentSheet was added in 16.8.0: https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md#1680---2021-05-07
Currently, did not have any issue when i change to 14.4.0 version,
but now I faced one more issue is, i wanna pass the data into the Card without using the Card Input Widget
Do you have any examples?
Not sure I understand. What is "the data"?
Are you trying to create a Payment Method using raw card data in your Android app?
something like this
ya, is it
~~I think this is the API you want to pass the raw card data to: https://stripe.dev/stripe-android/payments-core/com.stripe.android/create-card-token.html~~
because i have created different card insert method
You can create a Payment Method from the card details: https://stripe.dev/stripe-android/payments-core/com.stripe.android/create-payment-method.html
No, wait!
It's just that last link.
You pass the card details inside the PaymentMethodCreateParams: https://stripe.dev/stripe-android/payments-core/com.stripe.android.model/-payment-method-create-params/index.html
ok, i try research on it
i try using other method demo to store the value, but it give me the error like this
Can you provide the full error message?
Yeah, that's great!
Looks like the main issue is this: Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
The CardInputWidget is a UI element, are you trying to call this on a background thread?
ya
without displaying on the screen to let user insert
because i use firebase to pass the data to the CheckOut Page which the user credit card information and directly insert into the CardInputWidget
I don't think that's going to work.
You need to do this on the main thread since you're working with UI components.
so that the user must insert by themselves manually every time?
cannot have any method to pass the data to the CardInputWidget?
No, it's designed for putting in new card information, not displaying existing card information.
Let me confirm there's no way to do that though...
Oh, looks like there are some functions for it, like this one: https://stripe.dev/stripe-android/payments-core/com.stripe.android.view/-card-input-widget/set-card-number.html
But, again, you need to do this on the main thread, not in a background thread, as it's UI stuff.
you means that after i taken the data from firebase then insert insert into string then pass the value into the CardInputWidget on UI right?
Yes? Not 100% sure what you're describing to be honest.
To confirm, you're fully PCI compliant, right?
Since you're dealing with raw card numbers on your server?
yes
Is that approach working for you?