RegisterIdCommand
class RegisterIdCommand extends Command (View source)
Register client ID in sandbox environment.
The client application ID is a user generate UUID format 4, that is then registered with MTN Momo API.
Traits
Console commands utilities.
Properties
| protected ClientInterface | $client | Guzzle HTTP client instance. |
|
| protected string | $product | Product subscribed to. |
|
| protected string | $signature | The name and signature of the console command. |
|
| protected string | $description | The console command description. |
Methods
Write a string as standard output.
Warn user running command in production.
Print formatted labels.
Write | replace setting in .env file.
Create a new command instance.
Execute the console command.
Determine client ID.
Determine client Callback URI.
Register client ID.
Details
abstract void
line(string $string, string|null $style = null, int|string|null $verbosity = null)
Write a string as standard output.
protected bool
runInProduction(string $warning = 'Application In Production!')
Warn user running command in production.
protected void
printLabels(string $title, array|string $body = null)
Print formatted labels.
protected void
updateSetting(string $name, string $key, string $value)
Write | replace setting in .env file.
__construct(ClientInterface $client)
Create a new command instance.
void
handle()
Execute the console command.
protected string
getClientId()
Determine client ID.
protected string
getClientCallbackUri()
Determine client Callback URI.
protected bool
registerClientId(string $clientId, string $clientCallbackUri)
Register client ID.
The Callback URI is implemented in sandbox environment, but is still required when registering a client ID.