Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 67e11da

Browse filesBrowse files
Fix #127 #128 #126
1 parent 2763c66 commit 67e11da
Copy full SHA for 67e11da

File tree

1 file changed

+2
-5
lines changed
Filter options

1 file changed

+2
-5
lines changed

‎src/Paystack.php

Copy file name to clipboardExpand all lines: src/Paystack.php
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function makePaymentRequest( $data = null)
115115

116116
$quantity = intval(request()->quantity ?? 1);
117117

118-
$data = [
118+
$data = array_filter([
119119
"amount" => intval(request()->amount) * $quantity,
120120
"reference" => request()->reference,
121121
"email" => request()->email,
@@ -145,10 +145,7 @@ public function makePaymentRequest( $data = null)
145145
* ]
146146
*/
147147
'metadata' => request()->metadata
148-
];
149-
150-
// Remove the fields which were not sent (value would be null)
151-
array_filter($data);
148+
]);
152149
}
153150

154151
$this->setHttpResponse('/transaction/initialize', 'POST', $data);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.