{"id":37235390,"url":"https://github.com/gizemsever/laravel-paytr","last_synced_at":"2026-01-16T04:47:20.732Z","repository":{"id":59695654,"uuid":"536775177","full_name":"GizemSever/laravel-paytr","owner":"GizemSever","description":"Laravel Paytr Wrapper - Laravel Paytr Integration","archived":false,"fork":false,"pushed_at":"2024-06-03T21:43:04.000Z","size":30,"stargazers_count":26,"open_issues_count":2,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-14T14:41:20.106Z","etag":null,"topics":["laravel","laravel-package","laravel-wrapper","paytr"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/gizemsever/laravel-paytr","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/GizemSever.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-14T22:09:50.000Z","updated_at":"2025-08-16T19:04:55.000Z","dependencies_parsed_at":"2024-06-04T00:11:54.880Z","dependency_job_id":"d9935e3f-8503-4c18-9fc7-5d5409170fbd","html_url":"https://github.com/GizemSever/laravel-paytr","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"7d1c718531a07a3b165c373ee32f71258eb778ae"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/GizemSever/laravel-paytr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GizemSever%2Flaravel-paytr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GizemSever%2Flaravel-paytr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GizemSever%2Flaravel-paytr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GizemSever%2Flaravel-paytr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GizemSever","download_url":"https://codeload.github.com/GizemSever/laravel-paytr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GizemSever%2Flaravel-paytr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-package","laravel-wrapper","paytr"],"created_at":"2026-01-15T04:01:52.638Z","updated_at":"2026-01-15T04:01:53.447Z","avatar_url":"https://github.com/GizemSever.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n ## Laravel Paytr\n\nThis package has been developed only for the Paytr Iframe API service.\n\n**How to install?**\n\n    composer require gizemsever/laravel-paytr\n    \nPublish provider\n   \n    php artisan vendor:publish --provider=\"Gizemsever\\LaravelPaytr\\PaytrServiceProvider\"\n\nSetup your environment\n\n    PAYTR_MERCHANT_ID=''  \n    PAYTR_MERCHANT_SALT=''  \n    PAYTR_MERCHANT_KEY=''  \n    PAYTR_SUCCESS_URL='https://your-domain/success-payment'  \n    PAYTR_FAIL_URL='https://your-domain/fail-payment'  \n    PAYTR_TEST_MODE=true\n\n*NOTE: PAYTR_SUCCESS_URL and PAYTR_FAIL_URL are the frontend URLs that will be redirected after the payment screen. They are not addresses where payment will be verified.*\n\n **Create your product basket**\n\t\n\t\u003c?php \n\t\n\t$products = [\n\t\t[\n\t\t\t'Product Name',\n\t\t\t14.5, // Product Price\n\t\t\t5 // Quantity\n\t\t]\n\t];\n    $basket = \\Paytr::basket()-\u003eaddProducts($products);\n\n\n **Create Payment Request**\n\n    \u003c?php \n\t    use Gizemsever\\LaravelPaytr\\Payment\\Currency;\n\t    \n\t\t$payment = \\Paytr::payment()  \n\t\t    -\u003esetCurrency(Currency::TRY)  \n\t\t    -\u003esetUserPhone($phone)  \n\t\t    -\u003esetUserAddress($address)  \n\t\t    -\u003esetNoInstallment(1)  \n\t\t    -\u003esetMaxInstallment(1)  \n\t\t    -\u003esetEmail($email)  \n\t\t    -\u003esetMerchantOid($oid) // Payment id generated by you \n\t\t    -\u003esetUserIp($ipAddress)  \n\t\t    -\u003esetPaymentAmount($paymentAmount)  // Total payment amount\n\t\t    -\u003esetUserName($name)  \n\t\t    -\u003esetBasket($basket);  \n\n\t\t$paymentRequest = \\Paytr::createPayment($payment);\n\t\tif($paymentRequest-\u003eisSuccess()) {\n\t\t\t$token = $paymentRequest-\u003egetToken();\n\t\t\t// If the payment request has been successfully created, \n\t\t\t// you can view the iframe using the token.\n\t\t\t// Iframe URL: 'https://www.paytr.com/odeme/guvenli/'. $token\n\t\t}\n\t\t\t\n**Verify Payment**\n\n\tYou must set the Callback Url, where the result of the payment transaction will be notified to you, on the Paytr Panel. \n\nYou should add this endpoint as route\n\n    Route::post('paytr/payment-check', [PaytrController::class, 'checkPayment']);\n\nAnd check payment\n\n\t\u003c?php \n\tuse Illuminate\\Http\\Request;\n\tuse App\\Http\\Controllers\\Controller;\n\t\n    class PaytrController extends Controller  \n\t{  \n\t    public function checkPayment(Request $request)  \n\t    {\n\t\t    $verification = \\Paytr::paymentVerification($request);  \n\t\t\tif (!$verification-\u003everifyRequest()) {  \n\t\t\t    // Throw unauthorized  \n\t\t\t}\n\t\t\t\n\t\t\t$oid = $verification-\u003egetMerchantOid(); // Payment id generated by you \n\t\t\t$isSuccess = $verification-\u003eisSuccess(); // Is the payment status successful?\n\t\t\t// ... \n\t\t}\n\t}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizemsever%2Flaravel-paytr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgizemsever%2Flaravel-paytr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizemsever%2Flaravel-paytr/lists"}