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

Fropay for Russia Users [Android & Desktop] #1046

Merged
merged 31 commits into from
Apr 24, 2024
Merged

Conversation

jigar-f
Copy link
Contributor

@jigar-f jigar-f commented Apr 10, 2024

  • Added support for Dynamic payment provider with logs
  • Added support for Fropay
  • Added caching implementation to avoid call plans and payment API on Desktop
  • Fixed multiple issues on the plans screen
  • Added Plans-v4 support for Desktop and Android

Depends on -:getlantern/flashlight#1370

@jigar-f jigar-f marked this pull request as ready for review April 15, 2024 11:21
@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 16, 2024

@atavism Mind taking a look?

go.sum Outdated Show resolved Hide resolved
desktop/lib.go Outdated Show resolved Hide resolved
@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 19, 2024

@atavism Fixed issue payment methods not updating, Do you mind taking look at it again?

@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 22, 2024

@atavism If all is okay, I like to merge this and do a bit of testing with the main, I am planning to upload the beta tomorrow if all is okay.

@atavism
Copy link
Contributor

atavism commented Apr 22, 2024

@atavism Fixed issue payment methods not updating, Do you mind taking look at it again?

Thanks! Testing now

@atavism
Copy link
Contributor

atavism commented Apr 23, 2024

@jigar-f Everything seems to be working well for me. Changing my language on desktop returns the correct plans now!

I did run into one issue with Fropay -- and it's not an issue with the other payment providers -- the checkout page never loads for some reason:

Screenshot 2024-04-22 at 6 43 51 PM

Here's my logs:

Apr 23 01:54:34.095 - 12m50s DEBUG fronted: direct.go:402 Got successful connection to: &{a248.e.akamai.net 104.117.244.11} [http_method=GET http_proto=HTTP/1.1 is_idempotent=true masquerade_domain=a248.e.akamai.net masquerade_ip=104.117.244.11 op=dial_masquerade origin_host=api.getiantem.org origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.095 - 12m50s DEBUG fronted: direct.go:405 Wrapping connection in idletiming connection: &{a248.e.akamai.net 104.117.244.11} [http_method=GET http_proto=HTTP/1.1 is_idempotent=true masquerade_domain=a248.e.akamai.net masquerade_ip=104.117.244.11 op=dial_masquerade origin_host=api.getiantem.org origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.675 - 12m50s DEBUG app.settings: settings.go:656 Could not get value for enabledExperiments [dc=169c5d6b dial_type=connect force_proxied=true force_proxied_reason=routingrule local_proxy_type=http op=dial_for_balancer origin_port=443 proxy_host=150.230.114.161 proxy_multiplexed=false proxy_name=wigglytuff-169c5d6b-24c0-4edc proxy_network=tcp proxy_port=443 proxy_protocol=tlsmasq proxy_type=chained remotely_proxied=true root_op=proxy user_agent=Go-http-client/1.1]
Apr 23 01:54:34.841 - 12m50s DEBUG bandit: bandit.go:117 Dialer wigglytuff-169c5d6b-24c0-4edc-9fea-7a60299c16d6 dialed in 0.852793709 seconds [force_proxied=true force_proxied_reason=routingrule local_proxy_type=http op=proxied_dialer origin_port=443 remotely_proxied=true root_op=proxy user_agent=Go-http-client/1.1]
Apr 23 01:54:34.950 - 12m51s DEBUG fronted: cache.go:76 Updating cache at /Users/todd/Library/Application Support/Lantern/masquerade_cache
Apr 23 01:54:34.950 - 12m51s DEBUG flashlight.proxied: proxied.go:291 Got successful HTTP call for req.URL.Host [api.getiantem.org] [http_method=GET http_proto=HTTP/1.1 http_status_code=200 op=dualfetcher origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.950 - 12m51s DEBUG flashlight.proxied: proxied.go:334 Fronted request succeeded (200 OK) in 963.345958ms to https://api.getiantem.org/payment-redirect?countryCode=US&currency=RUB&deviceName=macos&email=tddbls4%40gmail.com&locale=ru_RU&plan=2y-rub-10&provider=fropay [http_method=GET http_proto=HTTP/1.1 http_status_code=200 op=dualfetcher origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.950 - 12m51s DEBUG flashlight.proxied: proxied.go:466 Got good first response [http_method=GET http_proto=HTTP/1.1 http_status_code=200 op=dualfetcher origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.950 - 12m51s DEBUG flashlight.proxied: proxied.go:357 Chained request to https://api.getiantem.org/payment-redirect?countryCode=US&currency=RUB&deviceName=macos&email=tddbls4%40gmail.com&locale=ru_RU&plan=2y-rub-10&provider=fropay failed [http_method=GET http_proto=HTTP/1.1 http_status_code=200 op=dualfetcher origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]
Apr 23 01:54:34.951 - 12m51s DEBUG flashlight.proxied: proxied.go:476 Ignoring error on second response [http_method=GET http_proto=HTTP/1.1 http_status_code=200 op=dualfetcher origin_port=80 parallel=true proxy_type=chained root_op=chainedandfronted]

@atavism
Copy link
Contributor

atavism commented Apr 23, 2024

Just had one comment. LGTM otherwise!

@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 23, 2024

I did run into one issue with Fropay -- and it's not an issue with the other payment providers -- the checkout page never loads for some reason:

Same for me. It's getting stuck with these logs, its loading same page again and again.

[MacOSInAppWebViewController] (macOS) MacOSInAppBrowser ID 1146541557413772911541342252032014573112150 calling "onReceivedHttpError" using {errorResponse: {statusCode: 403, reasonPhrase: null, contentType: text/html, contentEncoding: utf-8, data: null, headers: {cf-mitigated: challenge, Cross-Origin-Resource-Policy: same-origin, Referrer-Policy: same-origin, Server: cloudflare, Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, Content-Type: text/html; charset=UTF-8, cf-chl-out: a6+ec2OdTDW8S7ytl0MT9ccN89FiYoil79jNMTu3YvFgXB6FqCMK16q2H29ut8b41mkd/RXf0cND0+TRnzN9udDPQ2wm1ycNTf8p4/ymqLgZRRMsaDas7bd0S5bwNuhC7vDILHqwEI+relC4SdcGew==$SHSabiI64xs3YvCkRJMkXQ==, Vary: Accept-Encoding, Cross-Origin-Opener-Policy: same-origin, Content-Encoding: br, Expires: Thu, 01 Jan 1970 00:00:01 GMT, Alt-Svc: h3=":443"; ma=86400, X-Frame-Options: SAMEORIGIN, Date: Tue, 23 Apr 2024 06:38:57 GMT, accept-ch: Sec-CH-UA-Bitness, Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Mobile, Sec-CH-UA...

@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 23, 2024

@atavism Fropay recently added human verification that why its not working, Fropay open fine with system browser, Do you have any idea what might causing this issue?

@atavism
Copy link
Contributor

atavism commented Apr 23, 2024

Same for me. It's getting stuck with these logs, its loading same page again and again.

Oh, interesting.. I thought it might just be an issue on my side.

Here's the URL of the checkout page the webview is having trouble loading.. https://sci.fropay.art/get?amount=5580.00&shop_id=4515&label=cd81b13a-5f0e-4413-a6dd-2ab6085acc25 This loads fine for me in a browser

@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 24, 2024

@atavism Fropay recently added human verification which is why it's not working, Fropay opens fine with the system browser, Do you have any idea what might cause this issue?

I think this is the issue

lib/plans/checkout.dart Outdated Show resolved Hide resolved
@atavism
Copy link
Contributor

atavism commented Apr 24, 2024

@atavism Fropay recently added human verification that why its not working, Fropay open fine with system browser, Do you have any idea what might causing this issue?

@jigar-f Not sure. I tried changing several InAppBrowser settings: https://github.com/pichillilorenzo/flutter_inappwebview/blob/4c58653113573558ea5be880aca931e85b23da7e/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart#L95

but I still ran into the same issue. I think we can either try opening the URL in the system browser on macOS or just merge this for now? I can check quickly to see if it works on Windows

@jigar-f
Copy link
Contributor Author

jigar-f commented Apr 24, 2024

@atavism Yes, I did the same, Just give me a few mins, I am trying something that works, otherwise, I will merge this.

@jigar-f jigar-f merged commit 927bec8 into main Apr 24, 2024
1 of 2 checks passed
@jigar-f jigar-f deleted the jigar/fropay-payment branch April 24, 2024 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants