rbii-incorporated / stripe_native Goto Github PK
View Code? Open in Web Editor NEWFlutter plugin that facilitates Apple & Google Pay through Stripe.
License: MIT License
Flutter plugin that facilitates Apple & Google Pay through Stripe.
License: MIT License
Hi,
I've been looking in different places but I can't seem to figure out how to support Apple Pay / Google Pay in a currency different from USD?
Ultimately I would like to pass currency to Order() constructor.
Not even sure if Stripe plugin supports it. Any pointers?
When i'm trying run my App in iOS Simulator Apple Pay showing, but when i'm trying to real device i got this error.
I was add apple pay capability in xcode.
PlatformException(The operation couldn’t be completed. (stripe_native.StripeNativeError error 3.), Stripe was unable to create the payment request , null)
How to check, that Google Pay is supported?
everything was working fine nothing changed in a code, but now it fails every time with message:
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(Your payment information is formatted improperly. Please make sure you're correctly using the latest version of our iOS library. For more information see https://stripe.com/docs/mobile/ios., null, null, null) #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:582 #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:159 <asynchronous suspension> #2 MethodChannel.invokeMethod package:flutter/…/services/platform_channel.dart:332 #3 StripeNative.useReceiptNativePay package:stripe_native/stripe_native.dart:75 #4 _MakeDonationsScreenState._payMethod.<anonymous closure>.<anonymous closure> package:imosqueapp/…/donation/make_donations_screen.dart:541 #5 _InkResponseState._handleTap package:flutter/…/material/ink_well.dart:993 #6 _InkResponseState.build.<anonymous closure> (package:flutter/src/<…>
Android code always use WalletConstants.ENVIRONMENT_TEST environment regardless of publishable key type pk_live or pk_test
MethodChannel#stripe_native: Failed to handle method call
kotlin.KotlinNullPointerException
at com.rbitwo.stripe_native.StripeNativePlugin.onMethodCall(StripeNativePlugin.kt:138)
FAILURE: Build failed with an exception.
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.3.1
,2.3]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.nimbusds:nimbus-jose-jwt:8.15 -> net.minidev:json-smart@[1.3.1,2.3], but json-smart version was
2.3.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'stripe_native' which depends onto net.minidev:[email protected]
-- Project 'app' depends on project 'stripe_native' which depends onto com.stripe:[email protected]
-- Project 'app' depends on project 'stripe_native' which depends onto com.nimbusds:[email protected]
-- Project 'app' depends on project 'stripe_native' which depends onto com.stripe:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 12s
Exception: Gradle task assembleDebug failed with exit code 1
Hi my app is crashing if I'm not logged into a google account on my emulator. I'm getting a pop up with the information, that I am not logged in. The app crashes after I press OK
.
Android 11, API 30
StripeNative.setMerchantIdentifier("merchant.ga.tennisfy");
StripeNative.setCurrencyKey(event.finalPrice.currency);
StripeNative.setCountryKey("PL");
final order = Order(event.basePrice.amount, event.finalPrice.amount - event.basePrice.amount, 0.0, "Test");
final token = await StripeNative.useNativePay(order);
print(token);
StripeNative.confirmPayment(true);```
> D/AndroidRuntime(17315): Shutting down VM
E/AndroidRuntime(17315): FATAL EXCEPTION: main
E/AndroidRuntime(17315): Process: com.onwelo.tennisfy_flutter_user, PID: 17315
E/AndroidRuntime(17315): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=14, result=0, data=Intent { (has extras) }} to activity {com.example.tennisfy_flutter_user/com.onwelo.tennisfy_flutter_user.MainActivity}: java.lang.IllegalArgumentException: Unsupported value: Intent { (has extras) }
E/AndroidRuntime(17315): at android.app.ActivityThread.deliverResults(ActivityThread.java:5015)
E/AndroidRuntime(17315): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5056)
E/AndroidRuntime(17315): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
E/AndroidRuntime(17315): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(17315): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(17315): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime(17315): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(17315): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(17315): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime(17315): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17315): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(17315): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(17315): Caused by: java.lang.IllegalArgumentException: Unsupported value: Intent { (has extras) }
E/AndroidRuntime(17315): at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:278)
E/AndroidRuntime(17315): at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java:75)
E/AndroidRuntime(17315): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:243)
E/AndroidRuntime(17315): at com.rbitwo.stripe_native.StripeNativePlugin$Companion$registerWith$1.onActivityResult(StripeNativePlugin.kt:54)
E/AndroidRuntime(17315): at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:691)
E/AndroidRuntime(17315): at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:378)
E/AndroidRuntime(17315): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:625)
E/AndroidRuntime(17315): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:583)
E/AndroidRuntime(17315): at android.app.Activity.dispatchActivityResult(Activity.java:8310)
E/AndroidRuntime(17315): at android.app.ActivityThread.deliverResults(ActivityThread.java:5008)
E/AndroidRuntime(17315): ... 11 more
I/Process (17315): Sending signal. PID: 17315 SIG: 9
Any special requirement to go in Production with this plugin? Did I need to verify on Google Pay or Stripe will handle all of it?
On ios the returned token is empty if country code is invalid instead of detailed exception
StripeNative.useReceiptNativePay(receipt).then((cardtoken) {
print("CARD TOKEN: " + cardtoken); // is empty
StripeNative.confirmPayment(true);
}).catchError((e) {
print(e.toString());
StripeNative.confirmPayment(false);
withErrorDlg(e, context);
});
When i try to build release with
flutter build ios --release
it ends with
fatal error: 'stripe_native/StripeNativePlugin.h' file not found
#import <stripe_native/StripeNativePlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
while starts with
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Target 'Pods-Runner' of project 'Pods' was rejected as an implicit dependency for 'Pods_Runner.framework' because its architectures 'arm64' didn't contain all required architectures
'armv7 arm64'
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 70.7s
Built to build/aot/.
Here is the demo
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.