Comments (9)
@evelyne24 It would be preferable to provide a sync method or a RxJava hook/extension (See retrofit etc)
from stripe-android.
That's because the AsyncTask execute() needs to be called on the main thread. I'm imagining that you're probably calling subscribeOn() with a different thread or this observable is part of a bigger chain and at the end you call subscribeOn() a background thread. This could be solved (without using the Stripe fork) by simply making this observable call subscribeOn() the main thread so that it starts the async task where it needs.
from stripe-android.
@tomislavturcic, @chrisjenx, @caipivara, @evelyne24, and @chrisjenx
I'm happy to announce that we now have a synchronous createToken method (createTokenSynchronous
) in Stripe.java, and an example of using it with rxJava hooks in the example project.
I haven't yet shipped a new version to maven central, but I'll be doing that very shortly. In the meantime, the code is in the repo if you'd like to look at it!
from stripe-android.
@danielgomezrico see the yoyo/stripe-android fork
from stripe-android.
@chrisjenx You mean this one? https://github.com/justyoyo/stripe-android ?
from stripe-android.
Yeah, we added a sync method so we can wrap it with RX calls
On Sun, 19 Jul 2015 05:48 Daniel Gomez Rico [email protected]
wrote:
@chrisjenx https://github.com/chrisjenx You mean this one?
https://github.com/justyoyo/stripe-android—
Reply to this email directly or view it on GitHub
#47 (comment)
.
from stripe-android.
👍 thanks
from stripe-android.
@evelyne24 but that will not let me wrap it inside "my own rx api" for my project.
from stripe-android.
Is there any solution to this? I'm having 3 network calls after Stripe token is created and it would be nice to wrap them all up into a single call :)
EDIT: Would it be possible to copy this project, replace the asnyc call with a sync call and instead of using Android Stripe library, use regular Stripe Java library?
from stripe-android.
Related Issues (20)
- [BUG] Next Field isn't automatically focused in CardMultilineWidget HOT 2
- [BUG] Duplicate class com.sumsub.sns:idensic-mobile-sdk HOT 2
- [BUG] Missing proguard/R8 rules when using `payments-core` only HOT 2
- Support PayNow method Android HOT 1
- Greek Localization Issue - Payment Sheet Not Displaying in Greek for Most Users HOT 1
- [BUG] Shipping Dagger code/dependencies HOT 1
- [Feature] Customer sheet - only add card
- [BUG] App crash: IllegalStateException: Cannot locate windowRecomposer; View androidx.compose.ui.platform.ComposeView HOT 2
- [allowsRemovalOfLastSavedPaymentMethod] for the stripe-react-native HOT 1
- [Feature] Support Maestro cards for google wallets HOT 3
- [QUESTION] Request for Assistance: Locating PaymentSheet Example Server Side Backend Implementation Code HOT 1
- [BUG] "PaymentOptionsViewModel should already exist" when using PaymentSheet.FlowController HOT 4
- [BUG] HOT 1
- [BUG] Illegal char <:> at index 51: com.example.online_tutor.app-mergeDebugResources-41:/values/values.xml HOT 3
- [BUG] Stripe Elements | Google Pay Integration forces "BR" Country code in v.20.43.0 HOT 2
- [BUG] V-Pay debit cards don't get imported with google wallets HOT 1
- [BUG] Wrong title "Front of identity card" HOT 2
- [BUG] NoSuchMethodError when using AndroidX Lifecycle 2.8.0 HOT 4
- [Feature] Scan card not reading name and expiry date from the card. HOT 1
- [Feature] Is it possible to tweak the Card Scanning UI? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stripe-android.