Skip to content

Commit

Permalink
Update mobileData validity values
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Sep 9, 2019
1 parent f1842ff commit 3e2c5e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Instantiating the class will give you an object with available methods
- `phoneNumber`: Customer phone number (in international format). `REQUIRED`
- `quantity`: Mobile data amount. `REQUIRED`
- `unit`: Mobile data unit. Can either be `MB` or `GB`. `REQUIRED`
- `validity`: How long the mobile data is valid for. Must be one of `Daily`, `Weekly` and `Monthly`. `REQUIRED`
- `validity`: How long the mobile data is valid for. Must be one of `Day`, `Week` and `Month`. `REQUIRED`
- `metadata`: Additional data to associate with the tranasction. `REQUIRED`

- **$options:** optional associative array with the following keys:
Expand Down
4 changes: 2 additions & 2 deletions src/Payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ protected function doMobileData($parameters, $options = [])
}

if (isset($r['validity'])) {
if (!in_array($r['validity'], ['Daily', 'Monthly', 'Weekly'])) {
return $this->error('validity must be one of Daily, Weekly, Monthly');
if (!in_array($r['validity'], ['Day', 'Month', 'Week'])) {
return $this->error('validity must be one of Day, Week, Month');
}
}

Expand Down

0 comments on commit 3e2c5e9

Please sign in to comment.