{"id":21963940,"url":"https://github.com/threesquared/laravel-paymill","last_synced_at":"2025-04-24T01:21:48.008Z","repository":{"id":25497555,"uuid":"28928771","full_name":"threesquared/laravel-paymill","owner":"threesquared","description":"Laravel wrapper for the Paymill API","archived":false,"fork":false,"pushed_at":"2016-10-04T17:45:18.000Z","size":24,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T05:31:29.323Z","etag":null,"topics":["laravel","laravel-5-package","paymill"],"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/threesquared.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-01-07T18:55:53.000Z","updated_at":"2019-03-24T09:48:50.000Z","dependencies_parsed_at":"2022-08-06T04:15:35.663Z","dependency_job_id":null,"html_url":"https://github.com/threesquared/laravel-paymill","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threesquared%2Flaravel-paymill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threesquared%2Flaravel-paymill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threesquared%2Flaravel-paymill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threesquared%2Flaravel-paymill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threesquared","download_url":"https://codeload.github.com/threesquared/laravel-paymill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250541744,"owners_count":21447574,"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":["laravel","laravel-5-package","paymill"],"created_at":"2024-11-29T11:59:55.261Z","updated_at":"2025-04-24T01:21:47.993Z","avatar_url":"https://github.com/threesquared.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Laravel Paymill\n=======\n\n[![Build Status](https://travis-ci.org/threesquared/laravel-paymill.svg?branch=master)](https://travis-ci.org/threesquared/laravel-paymill) [![Latest Stable Version](https://poser.pugx.org/threesquared/laravel-paymill/version)](https://packagist.org/packages/threesquared/laravel-paymill) [![Packagist](https://img.shields.io/packagist/dt/threesquared/laravel-paymill.svg?maxAge=2592000)]() [![Packagist](https://img.shields.io/packagist/l/threesquared/laravel-paymill.svg?maxAge=2592000)]()\n\nLaravel Paymill is a Laravel 5 specific wrapper for the [Paymill PHP](https://github.com/paymill/paymill-php) library.\n\n- [Install](#install)\n- [Configuration](#configuration)\n- [Usage](#usage)\n\n**Please use the 1.0.0 release for Laravel 4**\n\n## Install\n\nSimply add the following line to your `composer.json` and run install/update:\n\n    \"threesquared/laravel-paymill\": \"~1.3\"\n\n## Configuration\n\nPublish the package config files to configure your api keys:\n\n    php artisan vendor:publish\n\nYou will also need to add the service provider and the facade alias to your `config/app.php`:\n\n```php\n'providers' =\u003e array(\n  Threesquared\\LaravelPaymill\\LaravelPaymillServiceProvider::class\n)\n\n'aliases' =\u003e array(\n  'Paymill'   =\u003e Threesquared\\LaravelPaymill\\Facades\\Paymill::class\n),\n```\n\nBy default the package will use your test keys. In order to use the live Paymill keys you need to set the `PAYMILL_ENV` enviroment variable.\n\n```\nPAYMILL_ENV=live\n```\n\n### Usage\n\n*Please see the [Paymill API](https://developers.paymill.com/API/index) for full documentation on all available entities, actions and methods.*\n\nFirst start with instantiating the Paymill entity you want to work with.\n\n```php\n$transaction = Paymill::Transaction();\n```\n\nAvailable entities are:\n\n* [Payment](https://developers.paymill.com/API/index#payments)\n* [Transaction](https://developers.paymill.com/API/index#transactions)\n* [Client](https://developers.paymill.com/API/index#clients)\n* [Preauthorization](https://developers.paymill.com/API/index#preauthorizations)\n* [Refund](https://developers.paymill.com/API/index#refunds)\n* [Offer](https://developers.paymill.com/API/index#offers)\n* [Subscription](https://developers.paymill.com/API/index#subscriptions)\n\nThen add in any additional information the request requires with setter methods.\n\n```php\n$transaction-\u003esetAmount(4200)\n    -\u003esetCurrency('EUR')\n    -\u003esetPayment('pay_2f82a672574647cd911d')\n    -\u003esetDescription('Test Transaction');\n```\n\nFinally chose which action you want to perform.\n\n```php\n$transaction-\u003ecreate();\n```\n\nAvailable actions are:\n\n* create()\n* details()\n* update()\n* all()\n* delete()\n\nSo an example to create a transaction would be:\n\n```php\ntry {\n\n    Paymill::Transaction()\n        -\u003esetAmount(4200)\n        -\u003esetCurrency('EUR')\n        -\u003esetPayment('pay_2f82a672574647cd911d')\n        -\u003esetDescription('Test Transaction')\n        -\u003ecreate();\n\n} catch(PaymillException $e) {\n\n    $e-\u003egetResponseCode();\n    $e-\u003egetStatusCode();\n    $e-\u003egetErrorMessage();\n\n}\n```\n\nYou can set the ID of an entity by passing it as an argument.\n\n```php\nPaymill::Client('client_8127a65bf3c84676c918')-\u003edetails();\n```\n\nPayment create can also take the token as an argument.\n\n```php\nPaymill::Payment()-\u003ecreate('098f6bcd4621d373cade4e832627b4f6');\n```\n\nYou can also use the `$paymill_public_key` variable across all blade views.\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\n  var PAYMILL_PUBLIC_KEY = '{{ $paymill_public_key }}';\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreesquared%2Flaravel-paymill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreesquared%2Flaravel-paymill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreesquared%2Flaravel-paymill/lists"}