flutter_stripe_demo's Issues
what needs to be done to make it work with paymetIntent
Nicely written article. What needst o be changed to make it work for stripe paymentIntent instead of the stripe Prebuilt checkouts .
Thanks
How to replace nikesPriceId
I'm getting this error because of nikesPriceId, where do I find it in stripe to replace ?
{"error":{"code":"resource_missing","doc_url":"https://stripe.com/docs/error-codes/resource-missing","message":"No such price: 'price_1HFw3QAQHy2zYPZft7bbrtWZ'","param":"line_items[0][price]","type":"invalid_request_error"}}
E/flutter ( 9306): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: DioError [DioErrorType.RESPONSE]: Http status error [400]
JS Error with a live key
When running this in iOS simulator with a live key, it gives error:
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'var stripe = Stripe('<Stripe key>');
stripe.redirectToCheckout({
sessionId: 'cs_live_a0tCIGOAnW9bEG4L0gNpHHwEvN9Rg22CrV21lYQIvSvn2l7SlhzvBgTKiq'
}).then(function (result) {
result.error.message = 'Error'
});
'
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=IntegrationError: Live Stripe.js integrations must use HTTPS. For more information: https://stripe.com/docs/security/guide#tls, WKJavaScriptExceptionColumnNumber=184970, WKJavaScriptExceptionSourceURL=https://js.stripe.com/v3/, NSLocalizedDescription=A JavaScript exception occurred}, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:1<…>
Facing an issue regarding {"error":{"code":"resource_missing","doc_url":"https://stripe.com/docs/error-codes/resource-missing","message":"No such price: 'price_1J7EIC2eZvKYlo2Cfmg2Hdbl'","param":"line_items[0][price]","type":"invalid_request_error"}}
How I can fix it out my app scenario is ticket booking so my amount can be vary not fix Please help me out.
Thanks
Backend Function Clarity
Is the purpose of the backend functions simply to dynamically retrieve the secret key and prices id to fill the body (price, quantity, payment method) and headers (client secret key) of the function below in order to create a checkout session and retrieve a session id?
try { final result = await Dio().post( "https://api.stripe.com/v1/checkout/sessions", data: body, options: Options( headers: {HttpHeaders.authorizationHeader: auth}, contentType: "application/x-www-form-urlencoded", ), ); return result.data['id'];
resource_missing error
I am getting the following error:
flutter: {"error":{"code":"resource_missing","doc_url":"https://stripe.com/docs/error-codes/resource-missing","message":"No such price: 'price_1HFw3QAQHy2zYPZft7bbrtWZ'","param":"line_items[0][price]","type":"invalid_request_error"}} [VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: DioError [DioErrorType.RESPONSE]: Http status error [400] #0 Server.createCheckout (package:flutter_stripe_demo/checkout/server_stub.dart:37:7) <asynchronous suspension> #1 redirectToCheckout (package:flutter_stripe_demo/checkout/stripe_checkout_mobile.dart:8:21) <asynchronous suspension>
What could I do to fix this issue?
No redirect
Hello,
I've implemented your solution that is really awesome however I'm facing an issue with the return URL, I can see on the stripe checkout page after a payment that the system is blocked to a loading with
'your payment is in progress, when finished you will be redirected automatically' but it's blocked.
I wonder if the localhost URL is not blocking that.
Do you have any idea?
Christophe
Feature request: get transaction data in success page
Excellent work and it is very helpful.
A feature request:
I think it would make a complete example if you can show how to use the stripe js library to get the transaction details upon a successful transaction.
Thank you
`invalid_request_error` while calling https://api.stripe.com/v1/checkout/sessions
This is what I am passing to my body
final body = {
'payment_method_types': ['card'],
'line_items': [
{
'price': 'price_1Ivaf4IicCqYtLEx7HJ1f67q',
'quantity': 1,
}
],
'mode': 'payment',
'success_url': 'http://localhost:8080/#/success',
'cancel_url': 'http://localhost:8080/#/cancel',
};
and I am getting this error
{
"error": {
"message": "Invalid request: unsupported Content-Type text/plain; charset=utf-8. If error persists and you need assistance, please contact [email protected].",
"type": "invalid_request_error"
}
}
NOTE: web part is running fine.
Want to implement it in an real app, can someone guide for the backend function
Hi saw your video about this project, and i want to implement it in flutter (production) do you have an example of the backend function cause i am not familiar that much with Js.
Please that would be a great help thank you.
flutter web
How can I detect the subscription button click on the checkout page and also help me with payment receipt in flutter web.
Thank you in advance !!
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.