Skip to content

Updated src/Paystack.php #21

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

Merged
merged 1 commit into from
Aug 24, 2017
Merged

Conversation

imyque
Copy link
Contributor

@imyque imyque commented Aug 24, 2017

  1. UPDATE: The makePaymentRequest function builds the payload from the request, assuming the request as the only source of the payload. In a situation when Laravel is used strictly as an API backend, there are situations where the payload needs to be built dynamically, say from within the controller and not from a view or request.

  2. NEW: Added getAuthorizationResponse function for a Laravel API scenario, where the controller may want take a different course of action if the initialization succeeded or not

1. UPDATE: The makePaymentRequest function builds the payload from the request, assuming the request as the only source of the payload. In a situation when Laravel is used strictly as an API backend, there are situations where the payload needs to be built dynamically, say from within the controller and not from a view or request.

2. NEW: Added getAuthorizationResponse function for a Laravel API scenario, where the controller may want take a different course of action if the initialization succeeded or not
array_filter($data);
public function makePaymentRequest( $data = null)
{
if ( $data == null ) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make use of the is_null method here like:

if (is_null($data)){...

@unicodeveloper unicodeveloper merged commit 22ee162 into unicodeveloper:master Aug 24, 2017
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

Successfully merging this pull request may close these issues.

2 participants