{"id":15939432,"url":"https://github.com/sergiomadness/payment-laravel","last_synced_at":"2025-10-19T02:30:32.172Z","repository":{"id":62530831,"uuid":"71338339","full_name":"SergioMadness/payment-laravel","owner":"SergioMadness","description":"Base library to use drivers for \"PayOnline\", \"Tinkoff\", \"Yandex.Kassa\", processing.kz and upc.ua payment systems","archived":false,"fork":false,"pushed_at":"2023-04-28T13:06:59.000Z","size":173,"stargazers_count":15,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-29T08:04:00.205Z","etag":null,"topics":["composer","laravel","online-kassa","payment","payonline","php","processing-kz","receipt","tinkoff","upc-ua","yandex-kassa"],"latest_commit_sha":null,"homepage":"","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/SergioMadness.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}},"created_at":"2016-10-19T08:59:12.000Z","updated_at":"2024-05-07T05:29:07.000Z","dependencies_parsed_at":"2022-11-02T14:45:23.661Z","dependency_job_id":"fe99ac63-cd91-47d0-80df-1eae18c14ebe","html_url":"https://github.com/SergioMadness/payment-laravel","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fpayment-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fpayment-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fpayment-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fpayment-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergioMadness","download_url":"https://codeload.github.com/SergioMadness/payment-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237049891,"owners_count":19246940,"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","laravel","online-kassa","payment","payonline","php","processing-kz","receipt","tinkoff","upc-ua","yandex-kassa"],"created_at":"2024-10-07T06:04:32.081Z","updated_at":"2025-10-19T02:30:31.827Z","avatar_url":"https://github.com/SergioMadness.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Payment provider for [Laravel](https://laravel.com/)\n====\n\n[![Latest Stable Version](https://poser.pugx.org/professionalweb/payment-laravel/v/stable)](https://packagist.org/packages/professionalweb/payment-laravel)\n[![Code Climate](https://codeclimate.com/github/SergioMadness/payment-laravel/badges/gpa.svg)](https://codeclimate.com/github/SergioMadness/payment-laravel)\n[![License](https://poser.pugx.org/professionalweb/payment-laravel/license)](https://packagist.org/packages/professionalweb/payment-laravel)\n[![Latest Unstable Version](https://poser.pugx.org/professionalweb/payment-laravel/v/unstable)](https://packagist.org/packages/professionalweb/payment-laravel)\n\n\nRequirements\n------------\n - PHP 7.2+\n\nDependencies\n------------\n - [laravel/laravel](https://github.com/laravel/laravel)\n\n\nInstallation\n------------\nModule is available through [composer](https://getcomposer.org/)\n\ncomposer require professionalweb/payment-laravel \"dev-master\"\n\nAlternatively you can add the following to the `require` section in your `composer.json` manually:\n\n```json\n\"professionalweb/payment-laravel\": \"^4.0\"\n```\nRun `composer update` afterwards.\n\nUsing\n-----------\nAt first user must be redirected to payment system page:\n```php\n\u003c?php\n\npublic function action(PayService $paymentService) {\n    redirect()-\u003eto(\n        $paymentService-\u003egetPaymentLink($order-\u003eid,\n            $payment-\u003eid,\n            $payment-\u003eamount,\n            $payment-\u003ecurrency,\n            PayService::PAYMENT_TYPE_CARD\n            $successfulPaymentReturnUrl,\n            $failedPaymentReturnUrl,\n            $description\n        );\n    );\n}\n```\n\nThen you need to handle async response:\n```php\n\u003c?php\n\npublic function responseHandler(PayService $paymentService) {\n    if($paymentService-\u003esetResponse($this-\u003egetRequest()-\u003eall())-\u003eisSuccess()) {\n        $orderId = $paymentService-\u003egetOrderId();\n        $status = $paymentService-\u003egetStatus();\n        $amount = $paymentService-\u003egetAmount();\n        $errorCode = $paymentService-\u003egetErrorCode();\n        $pan = $paymentService-\u003egetPan();\n        $paymentDate = $paymentService-\u003egetDateTime();\n        $transactionId = $paymentService-\u003egetTransactionId();\n        $provider = $service-\u003egetProvider();\n\n        // Update order, payment record, etc...\n    } else {\n        // something else\n    }\n}\n```\n\nReceipts\n--------\nTo send receipt to IRS\n```php\n/**\n * Prepare Receipt\n *\n * @param Order $order\n *\n * @return Receipt\n */\npublic function prepareReceipt(Order $order)\n{\n    $receipt = new Receipt($order-\u003euser-\u003eemail);\n    /** @var Item $item */\n    foreach ($order-\u003eitems as $item) {\n        $receipt-\u003eaddItem(new ReceiptItem($item-\u003ename, $item-\u003eqty, $item-\u003eprice, config('payment.tax')));\n    }\n\n    return $receipt;\n}\n```\n\nPayOnline has separate service to send register receipts and send to users.\n```php\nuse professionalweb\\payment\\contracts\\ReceiptService;\n\n$receipt = new Receipt($order-\u003euser-\u003eemail);\n$receipt-\u003esetTransactionId($transactionIdFromPayOnlineResponse);\n/** @var Item $item */\nforeach ($order-\u003eitems as $item) {\n    $receipt-\u003eaddItem(new ReceiptItem($item-\u003ename, $item-\u003eqty, $item-\u003eprice, config('payment.tax')));\n}\n\napp(ReceiptService::class)-\u003esendReceipt(\n    $this-\u003eprepareReceipt()\n);\n``` \n\n\nThe MIT License (MIT)\n---------------------\n\nCopyright (c) 2016 Sergey Zinchenko, [Professional web](http://web-development.pw)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiomadness%2Fpayment-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiomadness%2Fpayment-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiomadness%2Fpayment-laravel/lists"}