Skip to content

Ability to split payment into a subaccount #101

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
May 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ public function makePaymentRequest( $data = null)
"first_name" => request()->first_name,
"last_name" => request()->last_name,
"callback_url" => request()->callback_url,
/*
Paystack allows for transactions to be split into a subaccount -
The following lines trap the subaccount ID - as well as the ammount to charge the subaccount (if overriden in the form)
both values need to be entered within hidden input fields
*/
"subaccount" => request()->subaccount,
"transaction_charge" => request()->transaction_charge,
/*
* to allow use of metadata on Paystack dashboard and a means to return additional data back to redirect url
* form need an input field: <input type="hidden" name="metadata" value="{{ json_encode($array) }}" >
Expand Down