Skip to content

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

Open
@ebaranauskas

Description

@ebaranauskas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions