Skip to content

Commit

Permalink
Merge pull request #111 from chikeozulumba/master
Browse files Browse the repository at this point in the history
Set default value for quantity field
  • Loading branch information
unicodeveloper authored Aug 28, 2020
2 parents a370608 + fa339c5 commit 378310f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function makePaymentRequest( $data = null)
{
if ( $data == null ) {

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

$data = [
"amount" => intval(request()->amount) * $quantity,
Expand Down

0 comments on commit 378310f

Please sign in to comment.