{"id":36318622,"url":"https://github.com/bilions-org/2c2p-php","last_synced_at":"2026-01-11T11:42:51.450Z","repository":{"id":56061242,"uuid":"523406606","full_name":"bilions-org/2c2p-php","owner":"bilions-org","description":"2c2p payment gateway Redirect PHP-SDK","archived":false,"fork":false,"pushed_at":"2022-08-19T06:23:18.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-26T03:54:17.003Z","etag":null,"topics":["2c2p","2c2p-laravel","2c2p-php"],"latest_commit_sha":null,"homepage":"https://developer.2c2p.com/docs/redirect-api-how-it-works","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/bilions-org.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":"2022-08-10T15:55:04.000Z","updated_at":"2022-10-01T04:18:56.000Z","dependencies_parsed_at":"2022-08-15T12:30:28.431Z","dependency_job_id":null,"html_url":"https://github.com/bilions-org/2c2p-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bilions-org/2c2p-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilions-org%2F2c2p-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilions-org%2F2c2p-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilions-org%2F2c2p-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilions-org%2F2c2p-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilions-org","download_url":"https://codeload.github.com/bilions-org/2c2p-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilions-org%2F2c2p-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28301817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["2c2p","2c2p-laravel","2c2p-php"],"created_at":"2026-01-11T11:42:50.850Z","updated_at":"2026-01-11T11:42:51.431Z","avatar_url":"https://github.com/bilions-org.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://2c2p.com/assets/images/2C2P_Logo_RGB_Dark_Green-01.png\" alt=\"2c2p\" width=\"100\"/\u003e\n\n\n# 2c2p-PHP Library \u003cimg src=\"https://www.php.net//images/logos/new-php-logo.svg\" alt=\"2c2p\" width=\"50\"/\u003e\n\n## Usage\n\n#### Step 1. Setup 2c2p Credentials  \n```\nuse CCPP\\Config;\nuse CCPP\\Locale;\n\n$config               = Config::init();\n$config-\u003emerchantId   = 'JT02';\n$config-\u003esecretKey    = '72B8F060B3B923E580411200068A764610F61034AE729AB9EF20CAFF93AFA1B9';\n$config-\u003ecurrencyCode = 'MMK';\n$config-\u003elocale       = Locale::MYANMAR;\n$config-\u003ebaseUrl      = BaseUrl::SANDBOX;\n```\n\n#### Step 2. Prepare redirect API request payload\n```\nuse CCPP\\Requests\\RedirectApiRequest;\n\n$invoiceNo = uniqid(); // Your invoice Number\n\n$request                    = new RedirectApiRequest();\n$request-\u003eamount            = 10000;\n$request-\u003efrontendReturnUrl = 'https://example.com/';\n$request-\u003edescription       = 'Invoice Description';\n$request-\u003einvoiceNo         = $invoiceNo;\n$request-\u003epaymentChannel    = [PaymentChannel::CREDIT_CARD];\n$request-\u003ecustomerName      = 'Zin Kyaw Kyaw';\n$request-\u003ecustomerEmail     = 'necessarylion@gmail.com';\n\n```\n\n#### Step 3. Get redirect Url\n```\nuse CCPP\\RedirectApi;\n\n$payment = new RedirectApi();\n$url     = $payment-\u003egetUrl($request);\n```\n\n#### Step 4. Store payment token and invoiceNo in your database\n```\n$paymentToken = $payload-\u003epaymentToken();\n```\n\n#### Step 5. On frontendReturnUrl inquiry payment using paymentToken and invoiceNo\n```\n$result = $payment-\u003einquiryPayment(); // return PaymentInquiryResponse\n$success = $payment-\u003einquiryStatus(); // return boolean (true or false)\n```\n\n#### Other additional helpful functions\n- `$payment-\u003eresponse()` get full api response\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilions-org%2F2c2p-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilions-org%2F2c2p-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilions-org%2F2c2p-php/lists"}