@@ -124,25 +124,27 @@ public function makePaymentRequest( $data = null)
124
124
"last_name " => request ()->last_name ,
125
125
"callback_url " => request ()->callback_url ,
126
126
"currency " => (request ()->currency != "" ? request ()->currency : "NGN " ),
127
+
127
128
/*
128
129
Paystack allows for transactions to be split into a subaccount -
129
130
The following lines trap the subaccount ID - as well as the ammount to charge the subaccount (if overriden in the form)
130
131
both values need to be entered within hidden input fields
131
132
*/
132
133
"subaccount " => request ()->subaccount ,
133
134
"transaction_charge " => request ()->transaction_charge ,
135
+
134
136
/*
135
137
* to allow use of metadata on Paystack dashboard and a means to return additional data back to redirect url
136
138
* form need an input field: <input type="hidden" name="metadata" value="{{ json_encode($array) }}" >
137
- *array must be set up as: $array = [ 'custom_fields' => [
138
- * ['display_name ' => "Cart Id", "variable_name" => "cart_id", "value" => "2"],
139
- * ['display_name' => "Sex ", "variable_name" => "sex ", "value" => "female "],
140
- * .
141
- * .
142
- * .
143
- * ]
144
- *
145
- * ]
139
+ * array must be set up as:
140
+ * $array = [ 'custom_fields ' => [
141
+ * ['display_name' => "Cart Id ", "variable_name" => "cart_id ", "value" => "2 "],
142
+ * ['display_name' => "Sex", "variable_name" => "sex", "value" => "female"],
143
+ * .
144
+ * .
145
+ * .
146
+ * ]
147
+ * ]
146
148
*/
147
149
'metadata ' => request ()->metadata
148
150
]);
0 commit comments