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

400 error on paypal api with Uri. #18

Open
ABMamun-All opened this issue Jul 25, 2023 · 8 comments
Open

400 error on paypal api with Uri. #18

ABMamun-All opened this issue Jul 25, 2023 · 8 comments

Comments

@ABMamun-All
Copy link

ABMamun-All commented Jul 25, 2023

Always i get error called 400 when i use http_auth for creating paypal accesstoken. but, fewmonths ago without null safety i can only just put "var client = BasicAuthClient(clientId, secret);
var response = await client.post('$domain/v1/oauth2/token?grant_type=client_credentials');
" like this, but now I've to write code with only Uri ..

After this update. i can't run my update version for this. Please help me to slove this.. i try all off your version.

@ABMamun-All
Copy link
Author

What's happening here..!!!

@ABMamun-All
Copy link
Author

if u r not able to solve this problem you should remove this package from pub.

@marcoesposito1988
Copy link
Owner

Hi @ABMamun-All,

you got this the wrong way around. This is a best effort library that I wrote in my free time, and made public for free to contribute to the community. If you don't like it, please go ahead and use another one.

And stop polluting the issue session with your toxic comments. People like you are the reason why open source developers burn out and go into depression. If you continue, I will report you to GitHub.

For the record, I am aware that the library doesn't work with some servers, probably due to some subtle differences in the header capitalization or cryptographic algorithms in the dependencies I am using myself. Once in a while I give it a shot, but it's indeed shooting in the dark. I still dedicate some of my free time to debugging this problem to try to contribute to the community, but if it were for parasitic attitudes like yours I would indeed take my package off the package index, give you a refund (0.00$ + 20% VAT = 0.00$) and tell you to pay someone to do your job instead of poisoning the well you drink from.

@KrohnMi
Copy link
Contributor

KrohnMi commented Aug 12, 2023

@ABMamun-All The problem must be on your site, I just tried the following and it works without any issues.

import 'package:http_auth/http_auth.dart';

void main() async {
  final clientId = YOUR_CLIENT_ID;
  final secret = YOUR_SECRET;

  final client = BasicAuthClient(clientId, secret);
  final response = await client.post(Uri.parse('https://api-m.sandbox.paypal.com/v1/oauth2/token?grant_type=client_credentials'));

  print(response.body);
}

@Ignaciomanchu1998
Copy link

I face the same problem.

I tried flutter version 3.10.5 and it works perfectly. However with later versions I get the problem..

I know full well that this package is open source. And we don't pay for it, but it would be nice if they help us. Since we are some that we use.

Beforehand thank you very much.

@KrohnMi
Copy link
Contributor

KrohnMi commented Sep 6, 2023

@Ignaciomanchu1998 Can you please show your code? This will make it easier to reproduce the problem.

@Ignaciomanchu1998
Copy link

@KrohnMi , thanks.

image

Thanks for you help.

@Ignaciomanchu1998
Copy link

If you have this inconvenience, you can check this article.

https://medium.com/@dani.manchu1998/token-de-acceso-de-paypal-con-dart-5408066071a4

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

No branches or pull requests

4 participants