{"id":22150381,"url":"https://github.com/bahiazul/redsys-virtual-pos","last_synced_at":"2025-07-26T04:31:08.774Z","repository":{"id":22129225,"uuid":"25460051","full_name":"bahiazul/redsys-virtual-pos","owner":"bahiazul","description":"Redsys Virtual POS is an unofficial standalone PHP library to handle payments through the spanish payment service Redsys.","archived":false,"fork":false,"pushed_at":"2021-04-05T12:46:12.000Z","size":10049,"stargazers_count":4,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T08:47:05.589Z","etag":null,"topics":["composer","handle-payments","library","package","php","pos","redsys","redsys-virtual-pos","standalone","standalone-php-library","tpv","unofficial"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahiazul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-20T09:44:34.000Z","updated_at":"2021-08-21T14:32:01.000Z","dependencies_parsed_at":"2022-08-19T15:10:17.529Z","dependency_job_id":null,"html_url":"https://github.com/bahiazul/redsys-virtual-pos","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahiazul%2Fredsys-virtual-pos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahiazul%2Fredsys-virtual-pos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahiazul%2Fredsys-virtual-pos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahiazul%2Fredsys-virtual-pos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahiazul","download_url":"https://codeload.github.com/bahiazul/redsys-virtual-pos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227566923,"owners_count":17787427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","handle-payments","library","package","php","pos","redsys","redsys-virtual-pos","standalone","standalone-php-library","tpv","unofficial"],"created_at":"2024-12-02T00:15:15.353Z","updated_at":"2024-12-02T00:15:16.172Z","avatar_url":"https://github.com/bahiazul.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redsys Virtual POS\n\n[![Build Status](https://travis-ci.com/bahiazul/redsys-virtual-pos.png?branch=master)](https://travis-ci.com/bahiazul/redsys-virtual-pos)\n[![Latest Stable Version](https://poser.pugx.org/bahiazul/redsys-virtual-pos/v/stable)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)\n[![Total Downloads](https://poser.pugx.org/bahiazul/redsys-virtual-pos/downloads)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)\n[![Latest Unstable Version](https://poser.pugx.org/bahiazul/redsys-virtual-pos/v/unstable)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)\n[![License](https://poser.pugx.org/bahiazul/redsys-virtual-pos/license)](https://packagist.org/packages/bahiazul/redsys-virtual-pos)\n\n**Redsys Virtual POS** is an _unofficial_ standalone PHP library to handle payments through the spanish payment service Redsys.\n\n\u003e **NOTE:** This library its still under development and its functionality is subject to change.\n\n## Prerequisites\n\n-   PHP \u003e=5.4.0 \u003c8.0\n\n## Installation\n\nInstallation is recommended through [Composer](https://getcomposer.org/).\n\n```\n$ composer require bahiazul/redsys-virtual-pos\n```\n\n## Sample\n\nGo to the `sample` folder an run the following command in a terminal to start PHP's built-in web server:\n\n```\n# install dependencies\n$ composer install\n\n# start the server\n$ php -S 0.0.0.0:8000\n```\n\nThen open your browser and go to [here](http://localhost:8000/).\n\nIf you want to test the online (async) response, replace `localhost` with your public IP or hostname, making sure that your machine is accesible through the port 8000 (you can use another port if you want).\n\n## Usage\n\nBasic usage:\n\n```php\nuse Bahiazul\\RedsysVirtualPos\\Message\\WebRequest;\nuse Bahiazul\\RedsysVirtualPos\\Field\\Currency;\nuse Bahiazul\\RedsysVirtualPos\\Field\\TransactionType;\n\n$secret       = 'Mk9m98IfEblmPfrpsawt7BmxObt98Jev';\n$merchantCode = '999008881';\n$terminal     = '871';\n\n// The Environment object holds connection details\n$env = new Bahiazul\\RedsysVirtualPos\\Environment\\DevelopmentEnvironment();\n$env-\u003esetSecret($secret);\n\n// Setup the Parameters for the Request\n$params['Amount']             = '145'; // €1,45\n$params['Order']              = strval(time());\n$params['MerchantCode']       = $merchantCode;\n$params['Currency']           = Currency::EUR;\n$params['TransactionType']    = TransactionType::STANDARD;\n$params['Terminal']           = $terminal;\n$params['MerchantName']       = 'Test Store';                        // optional\n$params['ProductDescription'] = 'Product Description';               // optional\n$params['UrlOk']              = 'http://localhost:8000/success.php'; // optional\n$params['UrlKo']              = 'http://localhost:8000/failure.php'; // optional\n\n// Generate the Request\n$webRequest = new WebRequest($env);\n$webRequest-\u003esetParams($params);\n\n// Generate the form\n$submitBtn = \"\u003cp\u003e\u003cinput type='submit' value='Submit'\u003e\u003c/p\u003e\";\n$wrForm = $webRequest-\u003egetForm([], $submitBtn);\n\n// Render the HTML form w/ Submit button\necho $wrForm;\n```\n\nSee `sample/index.php` and `sample/response.php` for more detailed examples.\n\n## Test\n\nRun the following command in a terminal:\n\n```\n# install dependencies\n$ composer install\n\n# run the tests\n$ phpunit\n```\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## Authors\n\n-   [Javier Zapata](https://javi.io) ([Twitter](https://twitter.com/jzfgo))\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahiazul%2Fredsys-virtual-pos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahiazul%2Fredsys-virtual-pos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahiazul%2Fredsys-virtual-pos/lists"}