Skip to content
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
16 changes: 15 additions & 1 deletion src/Paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,21 @@ public function makePaymentRequest()
"plan" => request()->plan,
"first_name" => request()->first_name,
"last_name" => request()->last_name,
"callback_url" => request()->callback_url
"callback_url" => request()->callback_url,
/*
* 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) }}" >
*array must be set up as: $array = [ 'custom_fields' => [
* ['display_name' => "Cart Id", "variable_name" => "cart_id", "value" => "2"],
* ['display_name' => "Sex", "variable_name" => "sex", "value" => "female"],
* .
* .
* .
* ]
*
* ]
*/
'metadata' => request()->metadata
];

// Remove the fields which were not sent (value would be null)
Expand Down