codeboxrcodehub / flutter-bkash

Flutter/dart package for payment gateway bKash (Bangladesh)
https://pub.dev/packages/flutter_bkash
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Update allowed URL in WebView #13

Closed imSaharukh closed 2 months ago

imSaharukh commented 12 months ago

Fixes issue #12.

Problem

The issue was identified as a result of this reported problem, where the WebView was encountering a blank white screen on iOS. The root cause was traced back to the incorrect handling of URLs in the code.

Solution

The proposed solution corrects the URL validation logic. Previously, the code used request.url.startsWith("https://www.bkash.com/"), which proved to be incorrect. The fix now considers that sandbox URLs start with https://sandbox.payment.bkash.com, and live URLs start with https://payment.bkash.com.

Changes Made

Saim20 commented 3 months ago

Please merge this branch. Otherwise it's rendering unusable in IOS. for the time being I can manually change that to work but not a very good solution.