Skip to content

Commit

Permalink
Merge pull request #1 from soap/develop
Browse files Browse the repository at this point in the history
[FIXED] Account command not show live mode status
  • Loading branch information
soap authored Dec 21, 2024
2 parents edd187e + 9e9b0c9 commit e930425
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Commands/OmiseAccountCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public function handle(): int

return self::FAILURE;
}
$this->line('Account information retrieved successfully!');
$this->line('Account information retrieved successfully!', 'info');
$this->table(['Key', 'Value'], [
['ID', $response->id],
['Email', $response->email],
['Live Mode', $response->livemode],
['Live Mode', $response->livemode ? 'yes' : 'no'],
['Webhook Uri', $response->webhook_uri],
['Country', $response->country],
['Api Version', $response->api_version],
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/OmiseVerifyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function handle(): int

return self::FAILURE;
}
$this->line('Omise keys configuration is valid!');
$this->line('Omise keys configuration is valid!', 'info');
$this->line('Verifying connection to Omise API...');
$response = app('omise')->account()->retrieve();
if ($response instanceof \Soap\LaravelOmise\Omise\Error) {
Expand All @@ -27,7 +27,7 @@ public function handle(): int
return self::FAILURE;
}

$this->line('Connection to Omise API verified successfully!');
$this->line('Connection to Omise API verified successfully!', 'info');

return self::SUCCESS;
}
Expand Down
12 changes: 11 additions & 1 deletion src/Omise/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function retrieve()

private function shouldCallApi()
{
return $this->object === null;
return $this->object == null;
}

private function ensureDataExists()
Expand Down Expand Up @@ -144,4 +144,14 @@ public function getInstallmentMinLimit()
{
return $this->limits['installment_amount']['min'];
}

public function getChargeAmountMinLimit()
{
return $this->limits['charge_amount']['min'];
}

public function getChargeAmountMaxLimit()
{
return $this->limits['charge_amount']['max'];
}
}

0 comments on commit e930425

Please sign in to comment.