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] secure checkout screen opened for card that shouldn't support 3ds HOT 6
- [BUG] No static method ModalBottomSheetLayout-BzaUkTc HOT 1
- [BUG] HOT 1
- [Feature] Add existingPaymentMethodRequired configuration in PaymentSheet.GooglePayConfiguration
- [BUG] secure payment open for a sec and closed without user interaction HOT 8
- [Feature] Add support for payment method custom order in PaymentSheet HOT 1
- [BUG] The use of rememberPaymentSheet in jetpack compose Generate Thousands of recompositions in all the view HOT 3
- [BUG] Cursor color not updated with PaymentSheet.Appearance HOT 2
- [Feature] Add PaymentMethod object on PaymentOptionCallback HOT 4
- [Feature] compose desktop support
- [BUG] Margin between Label and Edit text HOT 2
- [Feature] Compose Native Views
- [BUG] Impossible to clone stripe-android GitHub repository on Windows HOT 2
- [BUG] Duplicate class org.tensorflow.lite HOT 3
- [BUG] Next Field isn't automatically focused in CardMultilineWidget
- [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
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.