Skip to content

Commit

Permalink
Monetary value fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabiezur committed May 27, 2016
1 parent a54c2eb commit e63d0d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Promocodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public function save($amount = 1, $reward = null)
$data = [];

foreach ($this->generate($amount) as $key => $code) {
$data[]['code'] = $code;
$data[]['reward'] = $reward;
$data[$key]['code'] = $code;
$data[$key['reward'] = $reward;
}

// if insertion goes well
Expand Down Expand Up @@ -185,7 +185,7 @@ public function apply($code, $hard_check = false)

//
if ($hard_check) {
return $row->reward;
return $record->reward;
} else {
return true;
}
Expand Down

0 comments on commit e63d0d5

Please sign in to comment.