egoistdeveloper/dummy-vpos

Dummy virtual POS screen integration for some weird testing cases

Fund package maintenance!

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:Blade

dev-main 2021-11-13 22:34 UTC

This package is auto-updated.

Last update: 2024-11-14 04:42:43 UTC


README

Stable Version Unstable Version Total Downloads License

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.

Demo

Example Project

Demo