Skip to content

Dummy virtual POS integration for some weird testing cases.

License

Notifications You must be signed in to change notification settings

relliv/dummy-vpos

Repository files navigation

dummy-vpos

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

About

Dummy virtual POS integration for some weird testing cases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published