capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 75 forks source link

Google Pay dont work #286

Closed jhonnathanH closed 10 months ago

jhonnathanH commented 1 year ago

Platform

Describe the bug the seput is like the demo/angular but with capcitor 4 and Google pay fail "Not implemented on Device"

To Reproduce Steps to reproduce the behavior: npm install ionic build npx cap sync android npx cap copy android

--console error

image image

Using Function:

MerlinOfCode commented 1 year ago

I'm glad I didn't even try this. The lack of documentation was a red flag, and now I see they do not answer any of these issues.

cyrilfr commented 1 year ago

I don't have this exception but I see this in logcat with the last version when it fails:

05-24 11:16:19.112 23967 23967 V Capacitor/Plugin: To native (Capacitor plugin): callbackId: 25438523, pluginId: Stripe, methodName: addListener
05-24 11:16:19.112 23967 23967 V Capacitor: callback: 25438523, pluginId: Stripe, methodName: addListener, methodData: {"eventName":"googlePayFailedToLoad"}
05-24 11:16:19.115 23967 27907 E om.shareman.app: == MALI DEBUG ===BAD ALLOC from gles_texture_egl_image_get_2d_template err is 0
05-24 11:16:19.122 23967 27832 E GPUAUX  : [AUX]GuiExtAuxCheckAuxPath:674: Null anb
05-24 11:16:19.122 23967 27832 E GPUAUX  : [AUX]GuiExtAuxCheckAuxPath:674: Null anb
05-24 11:16:19.695 23967 27782 W om.shareman.app: Cleared Reference was only reachable from finalizer (only reported once)
05-24 11:16:19.697 23967 27782 W om.shareman.app: Reducing the number of considered missed Gc histogram windows from 132 to 100
05-24 11:16:24.223 23967 23967 V Capacitor/Plugin: To native (Capacitor plugin): callbackId: 25438524, pluginId: Stripe, methodName: createGooglePay
05-24 11:16:24.223 23967 23967 V Capacitor: callback: 25438524, pluginId: Stripe, methodName: createGooglePay, methodData: {"paymentIntentClientSecret":"pi_3NBDnwCDYVoPgod50RntYOIC_secret_jKpYuY5FQLyFvMYnYjglEYvcP"}
05-24 11:16:24.224 23967 27884 V Capacitor/StripePlugin: Notifying listeners for event googlePayLoaded
05-24 11:16:24.224 23967 27884 D Capacitor/StripePlugin: No listeners found for event googlePayLoaded
05-24 11:16:24.237 23967 23967 I Capacitor/Console: File: http://localhost/ - Line 228 - Msg: undefined
05-24 11:16:24.459 23967 23967 V Capacitor/Plugin: To native (Capacitor plugin): callbackId: 25438525, pluginId: Stripe, methodName: presentGooglePay
05-24 11:16:24.459 23967 23967 V Capacitor: callback: 25438525, pluginId: Stripe, methodName: presentGooglePay, methodData: {}
05-24 11:16:24.478 23967 23967 V Capacitor/AppPlugin: Notifying listeners for event pause
05-24 11:16:24.478 23967 23967 D Capacitor/AppPlugin: No listeners found for event pause
05-24 11:16:24.484 23967 23967 D Capacitor: App paused
05-24 11:16:24.501 23967 11486 D libMEOW : meow new tls: 0xb4000072b7ff0740
05-24 11:16:24.501 23967 11486 D libMEOW : applied 1 plugins for [com.shareman.app]:
05-24 11:16:24.501 23967 11486 D libMEOW :   plugin 1: [libMEOW_gift.so]: 0xb4000072ae57a1c0
05-24 11:16:24.501 23967 11486 D libMEOW : rebuild call chain: 0xb4000072b7f63ac0
05-24 11:16:24.501 23967 11486 D libMEOW : meow delete tls: 0xb4000072b7ff0740
05-24 11:16:24.526 23967 23967 D WindowManager: Add to mViews: DecorView@5c1493a[GooglePayLauncherActivity],pkg= com.shareman.app
05-24 11:16:24.532 23967 23967 D InputEventReceiver: Input log is disabled
05-24 11:16:24.533 23967 23967 D VRI[MainActivity]: onFocusEvent false
05-24 11:16:24.533 23967 23967 I Quality : Skipped: false 0 cost 9.871615 refreshRate 11125916 bit true processName com.shareman.app
05-24 11:16:24.543 23967 23967 D BufferQueueConsumer: [](id:5d9f00000003,api:0,p:-1,c:23967) connect: controlledByApp=false
05-24 11:16:24.544 23967 23967 E IPCThreadState: attemptIncStrongHandle(101): Not supported
05-24 11:16:24.544 23967 23967 V ZoomWindowDecorView: setLastReportedMergedConfiguration mZoomDisplayHeight: 2400 getDecorView.96553274
05-24 11:16:24.548 23967 23967 D VRI[GooglePayLauncherActivity]: registerCallbacksForSync syncBuffer=false
05-24 11:16:24.551 23967 27832 D BLASTBufferQueue: [VRI[GooglePayLauncherActivity]#3](f:0,a:1) acquireNextBufferLocked size=1080x2400 mFrameNumber=1 applyTransaction=true mTimestamp=1919679566609497(auto) mPendingTransactions.size=0 graphicBufferId=102937481183245 transform=0
05-24 11:16:24.551 23967 27832 D VRI[GooglePayLauncherActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true syncBuffer=false
05-24 11:16:24.552 23967 27832 W Parcel  : Expecting binder but got null!
05-24 11:16:24.552 23967 23967 D VRI[GooglePayLauncherActivity]: draw finished.
05-24 11:16:24.556 23967 23967 D VRI[GooglePayLauncherActivity]: registerCallbacksForSync syncBuffer=false
05-24 11:16:24.556 23967 27832 D VRI[GooglePayLauncherActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=2 didProduceBuffer=false syncBuffer=false
05-24 11:16:24.556 23967 23967 D VRI[GooglePayLauncherActivity]: draw finished.
05-24 11:16:24.591 23967 23967 D VRI[GooglePayLauncherActivity]: onFocusEvent true
05-24 11:16:24.684 23967 27899 D TrafficStats: tagSocket(103) with statsTag=0xffffffff, statsUid=-1
05-24 11:16:25.026 23967 27899 D TrafficStats: tagSocket(302) with statsTag=0xffffffff, statsUid=-1
05-24 11:16:25.053 23967 23967 D VRI[GooglePayLauncherActivity]: onFocusEvent false
05-24 11:16:25.055 23967 23967 D Capacitor: Unable to find a Capacitor plugin to handle requestCode, trying Cordova plugins 1578078752
05-24 11:16:25.059 23967 23967 V Capacitor/StripePlugin: Notifying listeners for event googlePayFailed
05-24 11:16:25.059 23967 23967 D Capacitor/StripePlugin: No listeners found for event googlePayFailed
05-24 11:16:25.061 23967 23967 D Capacitor/AppPlugin: Firing change: true
05-24 11:16:25.061 23967 23967 V Capacitor/AppPlugin: Notifying listeners for event appStateChange
05-24 11:16:25.061 23967 23967 D Capacitor/AppPlugin: No listeners found for event appStateChange
05-24 11:16:25.061 23967 23967 V Capacitor/AppPlugin: Notifying listeners for event resume
05-24 11:16:25.061 23967 23967 D Capacitor/AppPlugin: No listeners found for event resume
05-24 11:16:25.073 23967 23967 D Capacitor: App resumed

It just stop silently and return a Failed paymentResult.

richardkshergold commented 1 year ago

@TheWizardofWikacy I'm looking at options now for Apple/Google payments in our Ionic App - what options have you looked at if you didn't use this one?

cyrilfr commented 1 year ago

I tested with v4 of this plugin, and that doesn't work either, so I think that the API has changed in SDK 33 or somethin'.

cyrilfr commented 1 year ago

@jhonnathanH do you have a card in your Google Wallet? I have the exact same error with Apple Pay when no card is present in the wallet.

rdlabo commented 1 year ago

Google Pay returns "false" if there is no setting in the wallet, even if the device is Android and Google Pay is enabled.

rdlabo commented 10 months ago

This issue is closed due to lack of activity for a long time. Please start a new Issue if needed.