agaweb / react-native-stripe Goto Github PK
View Code? Open in Web Editor NEWUnofficial integration of the payment APIs from the Stripe SDK on react-native
License: MIT License
Unofficial integration of the payment APIs from the Stripe SDK on react-native
License: MIT License
How can I use test card in this Lib
i want to save user card during payment, so i need to provide setupFutureUsage params to let Stripe supported it
Can we have a callback result for confirmCardSetup function as I need paymentmethodkey for updating by backend
Describe the bug
Compiling android build generate:
/agaweb/reactnativestripe/ReactCardMultilineView.kt: (51, 45): Type mismatch: inferred type is (???, ???) -> Unit but CardValidCallback? was expected
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should compile without error.
Additional context
But it silent the error when I explicitly add the type instead of using lambda.
cardMultilineWidget.setCardValidCallback(object: CardValidCallback {
override fun onInputChanged(isValid: Boolean, invalidFields: Set<CardValidCallback.Fields>){
val event: WritableMap = Arguments.createMap()
event.putBoolean("isValid", isValid)
if (isValid) {
val params = Arguments.createMap()
val typeDataParams = cardMultilineWidget.cardParams!!.typeDataParams
params.putString("number", typeDataParams.get("number") as String)
params.putInt("expMonth", typeDataParams.get("exp_month") as Int)
params.putInt("expYear", typeDataParams.get("exp_year") as Int)
params.putString("cvc", typeDataParams.get("cvc") as String)
if (typeDataParams.get("address_zip") != null)
params.putString("postalCode", typeDataParams.get("address_zip") as String)
event.putMap("cardParams", params)
}
(context as ReactContext).getJSModule(RCTEventEmitter::class.java).receiveEvent(id, "onCardValidCallback", event)
}
})
Describe the bug
Hey, I'm getting this error:
C:/PROJECTS/VIRTUALHOCKEY/node_modules/@agaweb/react-native-stripe/src/StripeCardInputWidget.js 75:4
Module parse failed: Unexpected token (75:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| return (
> <TouchableWithoutFeedback>
| <StripeCardInputWidgetNative
| {...props}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
start the app
I would like to passing payment_method
to confirmCardSetup
(I would like to pass metadata
), here is how it can be done with tipsi-stripe
:
const setupIntent = await stripe.confirmSetupIntent({
clientSecret: clientSetupIntent.client_secret,
paymentMethod: {
card,
metadata: {...},
},
});
The same for confirmPaymentWithCard
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.