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

DirectDebitService::submit and DirectDebitService::standaloneCredits do not gracefully handle bad data #13

Open
PayLeaseBrian opened this issue Jun 26, 2017 · 2 comments

Comments

@PayLeaseBrian
Copy link
Contributor

PayLeaseBrian commented Jun 26, 2017

DirectDebitService::submit does not gracefully handle bad data. If the submitted Purchase object has none of ach, eft, bacs, or sepa set, the function will cause a PHP error: Undefined variable: return

Additionally, DirectDebitService::standaloneCredits suffers from the same logic flaw. If the submitted StandaloneCredits object has none of ach, eft, or bacs set, the function will cause a PHP error:
Undefined variable: return

It would likely be more appropriate to throw an exception in these cases. Or, at least have some meaningful return.

@PayLeaseBrian PayLeaseBrian changed the title DirectDebitService::submit does not gracefully handle bad data DirectDebitService::submit and DirectDebitService::standaloneCredits do not gracefully handle bad data Dec 12, 2017
@PayLeaseBrian
Copy link
Contributor Author

@francoisneron why was this issue closed?

@francoisneron francoisneron reopened this Feb 22, 2018
@francoisneron
Copy link
Contributor

Apologize @PayLeaseBrian. I might have slipped a click while my page was loading.

sanyokerem pushed a commit to sanyokerem/paysafe_sdk_php that referenced this issue Jul 15, 2020
RT-10600: Added update bank account methods; RT-10893: Fixed state 'OR_'
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

2 participants