Skip to content

feat: add support for Terminal, Virtual Terminal, and Order API integ…#51

Merged
myckhel merged 4 commits into
mainfrom
new-paystack-apis
Jul 6, 2026
Merged

feat: add support for Terminal, Virtual Terminal, and Order API integ…#51
myckhel merged 4 commits into
mainfrom
new-paystack-apis

Conversation

@myckhel

@myckhel myckhel commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

…rations with associated controllers and tests

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Paystack Terminal, Virtual Terminal, and Order API support to the package by introducing new support classes/controllers, wiring optional proxy routes, and expanding tests/documentation accordingly.

Changes:

  • Added Terminal, VirtualTerminal, and Order support classes plus matching controllers.
  • Registered new route mappings in src/routes.php and added route registration tests.
  • Added PHPUnit tests for the new support classes and expanded README guidance; updated Composer deps/lock.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/Support/VirtualTerminalTest.php Adds HTTP-fake tests for Virtual Terminal support methods
tests/Support/TerminalTest.php Adds HTTP-fake tests for Terminal support methods (includes a couple request assertions)
tests/Support/OrderTest.php Adds HTTP-fake tests for Order support methods
tests/RoutesTest.php Verifies new controller actions are registered as routes
src/Support/VirtualTerminal.php Introduces Virtual Terminal support wrapper methods
src/Support/Terminal.php Introduces Terminal support wrapper methods
src/Support/Order.php Introduces Order support wrapper methods
src/routes.php Registers Terminal/Virtual Terminal/Order routes and controller bindings
src/Http/Controllers/VirtualTerminalController.php Adds controller adapter for Virtual Terminal routes
src/Http/Controllers/TerminalController.php Adds controller adapter for Terminal routes (special-cases 2-param endpoint)
src/Http/Controllers/OrderController.php Adds controller adapter for Order routes
readme.md Expands usage scenarios and lists new support classes
composer.json Adds direct guzzlehttp/guzzle requirement
composer.lock Updates locked dependencies (notably Guzzle)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Support/Order.php
Comment thread src/routes.php Outdated
Comment thread tests/Support/OrderTest.php
Comment thread readme.md Outdated
Comment thread src/Support/Order.php
Comment on lines +15 to +23
/**
* Create an order on your integration.
*
* @return array
*/
static function create($params = [])
{
return self::post("/order", $params);
}
Comment thread src/Support/Terminal.php
Comment on lines +16 to +24
/**
* List terminals available on your integration.
*
* @return array
*/
static function list($params = [])
{
return self::get("/terminal", $params);
}
Comment on lines +16 to +24
/**
* Create a virtual terminal on your integration.
*
* @return array
*/
static function create($params = [])
{
return self::post("/virtual_terminal", $params);
}
myckhel and others added 2 commits July 6, 2026 23:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.

Comment thread src/Support/Terminal.php
Comment on lines +21 to +24
static function list($params = [])
{
return self::get("/terminal", $params);
}
Comment on lines +22 to +24
$response = VirtualTerminal::create(['title' => 'Test VT']);
$this->assertTrue($response['status']);
}
Comment on lines +22 to +24
$response = Order::create(['product' => 'prod_123']);
$this->assertTrue($response['status']);
}
Comment on lines +35 to +37
$response = Terminal::fetch('term_123');
$this->assertTrue($response['status']);
}
Comment thread readme.md
Comment on lines 13 to +16
- Covers a broad set of Paystack endpoints (transactions, customers, transfers, plans, subscriptions, disputes, refunds, and more).
- Optional built-in HTTP routes for quick API proxying from your Laravel app.
- Built-in webhook route with signature validation and event dispatching.
- Compatible with Laravel `10`, `11`, and `12`.
- Compatible with Laravel `10`, `11`, `12`, and `13`.
@myckhel myckhel merged commit 5008c99 into main Jul 6, 2026
5 checks passed
@myckhel myckhel deleted the new-paystack-apis branch July 6, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants