{"id":25182405,"url":"https://github.com/mattiabasone/pagonline","last_synced_at":"2025-05-07T09:24:50.156Z","repository":{"id":34188459,"uuid":"171299125","full_name":"mattiabasone/PagOnline","owner":"mattiabasone","description":"PHP Library for PagOnline Payment Gateway with Laravel Support","archived":false,"fork":false,"pushed_at":"2025-04-10T20:38:37.000Z","size":228,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T20:41:30.869Z","etag":null,"topics":["bank","laravel","laravel-package","library","online-payments","pagonline","payments","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattiabasone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-18T14:30:21.000Z","updated_at":"2025-04-10T20:37:27.000Z","dependencies_parsed_at":"2025-02-09T17:42:35.520Z","dependency_job_id":null,"html_url":"https://github.com/mattiabasone/PagOnline","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiabasone%2FPagOnline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiabasone%2FPagOnline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiabasone%2FPagOnline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiabasone%2FPagOnline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattiabasone","download_url":"https://codeload.github.com/mattiabasone/PagOnline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252848975,"owners_count":21813761,"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":["bank","laravel","laravel-package","library","online-payments","pagonline","payments","php"],"created_at":"2025-02-09T17:32:02.823Z","updated_at":"2025-05-07T09:24:50.139Z","avatar_url":"https://github.com/mattiabasone.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PagOnline Library\n\nThis library can be used with PagOnline Payment Gateway and it can be easily integrated in Laravel.\n\nWith this package I'm trying to improve the crappy IGFS CG PHP Library provided by PagOnline Payment gateway.\n\n[![PHP Version](https://img.shields.io/packagist/php-v/mattiabasone/PagOnline)]()\n[![Latest Stable Version](https://poser.pugx.org/mattiabasone/pagonline/v/stable)](https://packagist.org/packages/mattiabasone/pagonline)\n[![Total Downloads](https://poser.pugx.org/mattiabasone/pagonline/downloads)](https://packagist.org/packages/mattiabasone/pagonline)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/mattiabasone/PagOnline/.github/workflows/php.yml?branch=master)](https://github.com/mattiabasone/PagOnline/actions?query=workflow%3ATest)\n[![Coverage Status](https://coveralls.io/repos/github/mattiabasone/PagOnline/badge.svg?branch=master)](https://coveralls.io/github/mattiabasone/PagOnline?branch=master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mattiabasone/PagOnline/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mattiabasone/PagOnline/?branch=master)\n\n### Basic Usage\n\nDemo scripts can be found in `tests/demo`, example Init Request:\n\n```php\n\u003c?php \n\nrequire __DIR__.'/vendor/autoload.php';\n\n$init = new \\PagOnline\\Init\\IgfsCgInit();\n$init-\u003eserverURL = \"https://payment-gateway-example.com/IGFS_CG_SERVICES/services\";\n$init-\u003etid = \"MY-TID-CODE\";\n$init-\u003ekSig = '1234567890987654321';\n$init-\u003eshopID = 'my-transaction-id';\n$init-\u003eshopUserRef = \"email@example.org\";\n$init-\u003etrType = \"AUTH\";\n$init-\u003ecurrencyCode = \"EUR\";\n$init-\u003eamount = 500; // Amount without comma (500 = 5,00)\n$init-\u003elangID = \"IT\";\n$init-\u003enotifyURL = \"http://my-domain.tld/verify.php\";\n$init-\u003eerrorURL = \"http://my-domain.tld/error.php\";\n$init-\u003eaddInfo1 = 'myFirstAddintionalInfo';\n\n// if you need to edit http client parameters...\n$init-\u003esetRequestTimeout(10); // Seconds\n$init-\u003esetConnectTimeout(5); // Seconds\n$init-\u003esetHttpProxy('tcp://some.proxy'); // Proxy server for requests\n$init-\u003esetHttpAuthUser('username'); // HTTP Basic Auth username\n$init-\u003esetHttpAuthPass('password'); // HTTP Basic Auth password\n\nif (!$init-\u003eexecute()) {\n    // Something went wrong\n} else {\n    // Redirect user to payment gateway\n    header(\"location: \".$init-\u003eredirectURL);\n}\n```\n\n### Usage in Laravel\n\nUsing Laravel 5.5+, the PagOnline service provider is automagically loaded at startup. \nIt loads the config file and the Factory Facade that can be used to create IgfsCg class instances.\n\nUsing Laravel auto-discovery feature you don't need to do that, anyway you can use artisan command `vendor:publish`  \nto copy `pagonline.php` config file for older Laravel versions:\n\n`php artisan vendor:publish --provider=\"PagOnline\\Laravel\\PagOnlineServiceProvider\"`\n\nYou also need to register the PagOnline Service Provider (`PagOnline\\Laravel\\PagOnlineServiceProvider`).\n\n#### Facade usage\n\n```php\nuse IgfsCg;\nuse PagOnline\\Actions;\n\n[...]\n\nclass MyController \n{\n    public function mySuperMethod()\n    {\n        $igfsCgInit = IgfsCg::make(Actions::IGFS_CG_INIT);\n        // Do something\n    }\n}\n```\n\n#### .env file configuration\nSet the following environment variables in your `.env` file:\n- `PAGONLINE_SERVER_URL` payment gateway server url (_default: null_)\n- `PAGONLINE_REQUEST_TIMEOUT` maximum timeout in seconds for completing a request (_default: 15_)\n- `PAGONLINE_CONNECT_TIMEOUT` maximum timeout in seconds for connecting to the server (_default: 5_)\n- `PAGONLINE_TERMINAL_ID` identifier provided by the payment gateway (_default: null_)\n- `PAGONLINE_SIGNATURE_KEY` signature key provided by the payment gateway (_default: null_)\n- `PAGONLINE_CURRENCY_CODE` currency code (_default: EUR_)\n- `PAGONLINE_LANGUAGE_ID` language code (_default: IT_)\n\n### TODO\n\n- [ ] Unit Tests\n\n### Contributing\n\nIf you want to contribute to this project, please use php-cs-fixer to format your code to PSR standards and rules \nspecified in the configuration file `.php_cs.dist` provided in this repository.\nThank you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiabasone%2Fpagonline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattiabasone%2Fpagonline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiabasone%2Fpagonline/lists"}