egoistdeveloper / dummy-vpos
Dummy virtual POS screen integration for some weird testing cases
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^7.3|^8.0
- illuminate/support: ^7.0|^8.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-11-14 04:42:43 UTC
README
Dummy virtual POS integration for some weird testing cases.
For example some companies do not provide virtual pos in the test environment (there is only direct success or fail response). You can perform a virtual POS payment scenarios with fake integration.
⚠️ Warning: This package created only for synthetic testing purpose. Not included real payment methods and you must use only development environment.
Table of contents
Requirements
- PHP 7.3 or higher
- Laravel 7.0 or higher
Installation
To get the latest version of dummy-vpos
, simply require the project using Composer:
$ composer require egoistdeveloper/dummy-vpos
Publish service provider:
$ php artisan vendor:publish --provider="DummyVpos\ServiceProvider"
Usage
Grab your response parameters then build http query and redirect to dummy-vpos.show
route.
$params = [ 'test' => true, 'id' => hash('md5', time()), 'name' => 'John Doe', 'price' => 999.99, 'successCallback' => route('success'), 'errorCallback' => route('fail'), ... ]; $vposUrl = route('dummy-vpos.show') . '?' . http_build_query($params);
successCallback, errorCallback and price are required for testing. Also price should be bigger than 0.
After reached fake virtual pos screen there are four possibility.
- Success
- Fail
- Wrong password
- Cancelation
- Timeout
All cases returns back to callback url (with sended parameters except callback urls) and success and fail code/messages can found be in dummy-vpos.php
config file.