flutter-plugin
flutter-plugin copied to clipboard
➕ Add the success/failure handling from Dart side for Apple Pay
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 |
---|
@JlUgia can you please take a look?
Hi @YazeedAlKhalaf. Thanks a lot for your contribution. I added some comments. Let me know your thoughts and continue from there.
@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.
@JlUgia can you please take a look at my comments and commit so we can move forward with this PR?
Hey @YazeedAlKhalaf, were you able to take a look at this commet?
@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.
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 but then I will be pushing code with red lines, it is okay?
@JlUgia I added a video at the top and made the changes you suggested, kindly check it out.
@JlUgia were you able to look at the new changes?
@JlUgia hopefully you have had time to look at the changes, so that we can merge it 😁.
Hi! I faced the same issue. Any updates?
@JlUgia
does the PR look good now? or it needs maybe more edits?
Hi @YazeedAlKhalaf Taking a look at this now
Any updates guys?
@JlUgia It has been a while 😅, around 6 months! But I would appreciate if you could look at the new code.