first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Utils\PPOBClient;
|
||||
use Flight;
|
||||
use flight\commands\AbstractBaseCommand;
|
||||
|
||||
/**
|
||||
* Check Status of PPOB Transaction from Server
|
||||
*
|
||||
* Usage: php runway ppob:check
|
||||
*
|
||||
*/
|
||||
|
||||
class PPOBCommand extends AbstractBaseCommand {
|
||||
/**
|
||||
* Construct
|
||||
* @param array<string,mixed> $config From .runway-config.json
|
||||
*/
|
||||
public function __construct(array $config) {
|
||||
parent::__construct('ppob:check', 'Check Status of PPOB Transaction from Server', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the function
|
||||
* @return void
|
||||
*/
|
||||
public function execute() {
|
||||
$io = $this->io();
|
||||
|
||||
require ($this->projectRoot . '/app/config/runway.php');
|
||||
|
||||
$ppob = new PPOBClient($app);
|
||||
$status = $ppob->CheckTrx();
|
||||
$io->comment("Status : ".$status['Status'], true);
|
||||
$io->comment("Message : ".$status['Message'], true);
|
||||
$io->ok("Done.", true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user