-
Notifications
You must be signed in to change notification settings - Fork 324
Added methods to handle Split payments #23
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please effect changes. Thanks.
src/Paystack.php
Outdated
@@ -387,6 +391,7 @@ public function createCustomer() | |||
]; | |||
|
|||
$this->setRequestOptions(); | |||
$this->setHttpResponse('/customer', 'POST', $data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this code added here?
src/Paystack.php
Outdated
]; | ||
|
||
$this->setRequestOptions(); | ||
array_filter($data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove array_filter from here and just call it line 613
like so:
return $this->setHttpResponse('/subaccount', 'POST', array_filter($data))->getResponse();
src/Paystack.php
Outdated
*/ | ||
public function listSubAccounts($per_page,$page){ | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we have some much whitespace here?
src/Paystack.php
Outdated
]; | ||
|
||
$this->setRequestOptions(); | ||
array_filter($data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply same logic here as mentioned above. Thanks!
Added some useful methods for people looking to use the split payments feature that Paystack now provides