Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Flutter Web #65

Open
DEVSOG12 opened this issue Sep 13, 2020 · 21 comments
Open

Add support for Flutter Web #65

DEVSOG12 opened this issue Sep 13, 2020 · 21 comments
Labels
enhancement New feature or request

Comments

@DEVSOG12
Copy link

This plugin is not supported for Flutter Web.

@wilburx9 wilburx9 added the enhancement New feature or request label Sep 14, 2020
@DEVSOG12
Copy link
Author

Is there any Platform specific code that is used in the Plugin. I want to try to add Web Support.

@PaulD1980
Copy link

Is there any Platform specific code that is used in the Plugin. I want to try to add Web Support.

Did you try to make it work with WEB?

@DEVSOG12
Copy link
Author

DEVSOG12 commented Feb 14, 2021

Is there any Platform specific code that is used in the Plugin. I want to try to add Web Support.

Did you try to make it work with WEB?

I tried but unfortunately, the plugin has a Platform Check (* To check if it's Android or iOS), but looking through the code, there wasn't any platform specific functions that cannot be implemented on Web.

I also thought of embedding paystack's javascript but I was really lazy! :(

I still don't see any reason why I can't work on web!

@djade007
Copy link

I was able to get this to work on web but I had to create a new package for web, then wrap this plugin for mobile.

@DEVSOG12
Copy link
Author

I was able to get this to work on web but I had to create a new package for web, then wrap this plugin for mobile.

Nice Plugin Works fine to me!!
@Wilburt maybe this can be implemented under flutter_paystack
Thanks

@wilburx9
Copy link
Owner

Good work @djade007. Is it possible to integrate the changes here and create a PR?

@DEVSOG12
Copy link
Author

DEVSOG12 commented Apr 4, 2021

@Wilburt I have created a PR #94

@wilburx9
Copy link
Owner

wilburx9 commented Apr 4, 2021

Thank you @DEVSOG12. I will take a look at the PR.

@wilburx9
Copy link
Owner

wilburx9 commented Apr 4, 2021

@djade007 you can also take a look at the PR.

@djade007
Copy link

djade007 commented Apr 4, 2021

The web version still only has the checkout option. I wanted to look if it will be possible to also add the Charge Card option on web. So as to make this package consistent.

@wilburx9
Copy link
Owner

wilburx9 commented Apr 4, 2021

@djade007 That's a very valid point. I think the major functionality we need from iOS and Android is RSA encryption. And as at the time this package was released, the encrypt package wasn't as mature as it is now.

I will find time to take a look if we can use encrypt instead of Objective-C and Kotlin for encryption. If this works, then we can go full Dart and support web properly otherwise we'll make do of #94.

@DEVSOG12
Copy link
Author

DEVSOG12 commented Apr 4, 2021

@djade007 I'm not too sure if via the UI the a card can be processed due to the nature of the Paystack JS.https://paystack.com/docs/payments/accept-payments

@Wilburt Maybe you could look into finding a way to use RSA encryption on Dart. That would be better.

I also think that the JS package handles the payment well. The Charge Card Option may not be the best in terms of security on Web

@djade007
Copy link

djade007 commented Apr 7, 2021

If we can replicate the native encryption it should still be as secure as the Android/iOS SDK.

Pending the time, I'll recommend the web version of the plugin I worked on should still be kept separate. It only exposes the checkout method, so only users who are interested in the default payment popup can use it.

@djade007
Copy link

djade007 commented Apr 7, 2021

This is the request data from the normal JS popup. You can see their JS library is also encrypting the card details before it is sent.
Screenshot 2021-04-07 at 9 06 49 PM

@Ola4606
Copy link

Ola4606 commented Apr 20, 2021

@Wilburt Hope you are still working on support for web, we need it soon, the other plugin for web is still just a JS pop up which is so unreliable(not the plugin the whole Js pop up is unreliable), I prefer the checkout method. Thanks

@Ola4606
Copy link

Ola4606 commented Apr 20, 2021

@djade007 @DEVSOG12 thanks for working with @Wilburt to make the web support.

@Ola4606
Copy link

Ola4606 commented Apr 24, 2021

Wooh no one replied @Wilburt can you reply please, so we know this issuses is still being worked on as it is really needed

@DEVSOG12
Copy link
Author

@Wilburt I'm trying work on the encryption natively on dart. I see that for android you use java. But.. the plugin extends a native channel for both android and iOS. So if we will be changing anything it would be best that we more everything to native dart. Because handling encryption in dart, and then some other things on the native channel may not be the best practice.

Or..
We could make encryption work on dart on for the purpose of flutter web.

@DEVSOG12
Copy link
Author

DEVSOG12 commented Aug 7, 2021

@Wilburt, @djade007 Check out #104 I have written RSA encryption in dart.

@KedwithGod
Copy link

Any support for desktop yet?

@wilburx9 wilburx9 mentioned this issue Sep 18, 2022
@Princewil
Copy link

Hey guys I implement paystack on web. It also supports various payment methods.

check it out=> https://pub.dev/packages/flutter_paystack_plus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants