Expired Adaptive Payment Method is Considered for Paypal Payouts #5988
Labels
api
Issues that require some work on the API (https://github.com/opencollective/opencollective-api)
bug
complexity → simple
Milestone
This is with regard to the freshdesk ticket; https://opencollective.freshdesk.com/a/tickets/119662.
It seems that the user has disabled PayPal payouts in host settings but still users are able to submit expenses with PayPal as payout method. The reason behind this seems to be that we also consider if the host has adaptive PayPal payout methods as per,
https://github.com/opencollective/opencollective-api/blob/871e29c37bd2eb274186f336b50c969fb6625c7e/server/graphql/v2/object/Host.js#L262-L270
However in the
getPaymentMethod
method we incorrectly useendDate
instead ofexpiryDate
to check if the payment method has expired.The text was updated successfully, but these errors were encountered: