1 | <?php |
||
13 | class Registra extends Command |
||
14 | { |
||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'mpesa:register_url'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Register mpesa validation and confirmation URL'; |
||
28 | /** |
||
29 | * @var RegisterUrl |
||
30 | */ |
||
31 | private $registerUrl; |
||
32 | |||
33 | /** |
||
34 | * Create a new command instance. |
||
35 | * |
||
36 | * @param RegisterUrl $registerUrl |
||
37 | */ |
||
38 | 1 | public function __construct(RegisterUrl $registerUrl) |
|
43 | |||
44 | /** |
||
45 | * Execute the console command. |
||
46 | * |
||
47 | * @return mixed |
||
48 | * @throws GuzzleException |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | public function handle() |
||
60 | |||
61 | private function askShortcode(): string |
||
65 | |||
66 | private function askConfirmationUrl(): string |
||
70 | |||
71 | private function askValidationUrl(): string |
||
75 | } |
||
76 |