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

When searching by payment amount = null, no payment methods returned #30

Open
ebaranauskas opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@ebaranauskas
Copy link

Newest library version, when trying to search for payment methods with amount = null:
WebToPay::getPaymentMethodList(6028, null, 'EUR')
returns no payment methods at all, because it wrongly searches by amount=0. I expect that it would not use amount for filtering at all, if its value is null.

There is a problem in library internals. When searching for amount = null, it uses URL https://www.paysera.com/new/api/paymentMethods/6028/currency:EUR/amount: (mind ":" at the end of URL) which returns nothing, same as https://www.paysera.com/new/api/paymentMethods/6028/currency:EUR/amount:0 But one would expect if we are not filtering by amount, such URL should be used instead: https://www.paysera.com/new/api/paymentMethods/6028/currency:EUR , which returns all enabled payment methods ignoring amount.

Proposed pull request is here: #29

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

1 participant