flutter-plugin icon indicating copy to clipboard operation
flutter-plugin copied to clipboard

➕ Add the success/failure handling from Dart side for Apple Pay

Open YazeedAlKhalaf opened this issue 1 year ago • 16 comments

This PR is a suggestion to be added to the pay plugin, I think it will make the experience better since now the developer can make the Apple Pay sheet result match their result.

Please give me comments not he implementation and if you have any suggestions I could make to get this PR merged.

Before: the plugin would always return payment successful in Apple Pay status Now: the plugin will run the completion handler when Dart side sends the status wanted, either success or failure. This is useful when you need to check with your backend server if the payment went through or not and match your app's status with the native sheet's status.

📱 Video Showcase

YazeedAlKhalaf avatar May 03 '23 13:05 YazeedAlKhalaf

@JlUgia can you please take a look?

YazeedAlKhalaf avatar May 07 '23 13:05 YazeedAlKhalaf

Hi @YazeedAlKhalaf. Thanks a lot for your contribution. I added some comments. Let me know your thoughts and continue from there.

JlUgia avatar May 31 '23 14:05 JlUgia

@JlUgia Thanks for your review and comments.

I will resolve them once I have time since I am currently busy with school work and finals.

YazeedAlKhalaf avatar Jun 05 '23 14:06 YazeedAlKhalaf

@JlUgia can you please take a look at my comments and commit so we can move forward with this PR?

YazeedAlKhalaf avatar Jul 08 '23 20:07 YazeedAlKhalaf

Hey @YazeedAlKhalaf, were you able to take a look at this commet?

JlUgia avatar Jul 31 '23 16:07 JlUgia

@JlUgia I am facing issues with local development, the packages use the published versions.

So should I create multiple PRs? and wait for you to publish the changes I need before moving on?

Because otherwise I would be pushing broken code that doesn't work, not sure what I should do. I read the contributing guide but found nothing related to this.

YazeedAlKhalaf avatar Aug 02 '23 17:08 YazeedAlKhalaf

You can use dependency_overrides in your pubspec.yaml during development, and revert back when you are ready to submit the code. You can see an example in the example project – https://github.com/google-pay/flutter-plugin/blob/main/pay/example/pubspec.yaml#L39

JlUgia avatar Aug 02 '23 20:08 JlUgia

@JlUgia but then I will be pushing code with red lines, it is okay?

YazeedAlKhalaf avatar Aug 02 '23 21:08 YazeedAlKhalaf

@JlUgia I added a video at the top and made the changes you suggested, kindly check it out.

YazeedAlKhalaf avatar Aug 02 '23 22:08 YazeedAlKhalaf

@JlUgia were you able to look at the new changes?

YazeedAlKhalaf avatar Aug 27 '23 09:08 YazeedAlKhalaf

@JlUgia hopefully you have had time to look at the changes, so that we can merge it 😁.

YazeedAlKhalaf avatar Sep 22 '23 20:09 YazeedAlKhalaf

Hi! I faced the same issue. Any updates?

Likhachev17 avatar Oct 24 '23 23:10 Likhachev17

@JlUgia

does the PR look good now? or it needs maybe more edits?

YazeedAlKhalaf avatar Dec 19 '23 08:12 YazeedAlKhalaf

Hi @YazeedAlKhalaf Taking a look at this now

JlUgia avatar Dec 19 '23 23:12 JlUgia

Any updates guys?

oleksii-pimenov avatar Apr 04 '24 18:04 oleksii-pimenov

@JlUgia It has been a while 😅, around 6 months! But I would appreciate if you could look at the new code.

YazeedAlKhalaf avatar Jun 01 '24 18:06 YazeedAlKhalaf