Skip to content

Commit 3e2c5e9

Browse files
committed
Update mobileData validity values
1 parent f1842ff commit 3e2c5e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Instantiating the class will give you an object with available methods
171171
- `phoneNumber`: Customer phone number (in international format). `REQUIRED`
172172
- `quantity`: Mobile data amount. `REQUIRED`
173173
- `unit`: Mobile data unit. Can either be `MB` or `GB`. `REQUIRED`
174-
- `validity`: How long the mobile data is valid for. Must be one of `Daily`, `Weekly` and `Monthly`. `REQUIRED`
174+
- `validity`: How long the mobile data is valid for. Must be one of `Day`, `Week` and `Month`. `REQUIRED`
175175
- `metadata`: Additional data to associate with the tranasction. `REQUIRED`
176176

177177
- **$options:** optional associative array with the following keys:

src/Payments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ protected function doMobileData($parameters, $options = [])
586586
}
587587

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

0 commit comments

Comments
 (0)