arshmancodes / paymob_pakistan

A plugin for Flutter to Easily accept Jazzcash/Easypaisa/Card Payments through Paymob Pakistan in your Flutter app.
MIT License
14 stars 3 forks source link

Internet availability #6

Open ammarjavedofficial opened 8 months ago

ammarjavedofficial commented 8 months ago

When invoking the "initializePayment" method, it should additionally provide the status indicating whether an internet connection is available.

arshmancodes commented 8 months ago

@ammarjavedofficial Internet connection availability check is not in the scope of payment module. Internet connectivity is checked outside the payment module where it is going to be implemented.

ammarjavedofficial commented 8 months ago

When calling the "initializePayment" method, it's recommended to leverage the capabilities of the dio package. By catching and handling SocketException within this method, you can facilitate a more straightforward approach to internet connectivity checking, as opposed to implementing additional algorithms for the same purpose. This not only enhances efficiency but also ensures a more streamlined and reliable payment initialization process.