PHPackages                             bilions/2c2p-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bilions/2c2p-php

ActiveLibrary

bilions/2c2p-php
================

2c2p PHP SDK

v1.0.2(3y ago)2241↑176.3%MITPHPCI failing

Since Aug 10Pushed 3y agoCompare

[ Source](https://github.com/bilions-org/2c2p-php)[ Packagist](https://packagist.org/packages/bilions/2c2p-php)[ RSS](/packages/bilions-2c2p-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

[![2c2p](https://camo.githubusercontent.com/9949e34377c5e3226b0615aa40c4ef8ba40f35da220584fa548e22bbf85552ea/68747470733a2f2f326332702e636f6d2f6173736574732f696d616765732f324332505f4c6f676f5f5247425f4461726b5f477265656e2d30312e706e67)](https://camo.githubusercontent.com/9949e34377c5e3226b0615aa40c4ef8ba40f35da220584fa548e22bbf85552ea/68747470733a2f2f326332702e636f6d2f6173736574732f696d616765732f324332505f4c6f676f5f5247425f4461726b5f477265656e2d30312e706e67)

2c2p-PHP Library [![2c2p](https://camo.githubusercontent.com/506f62e5d230ac25baad8edbafb58cb3f63ec2b28180b34460c93e72f0c302bb/68747470733a2f2f7777772e7068702e6e65742f2f696d616765732f6c6f676f732f6e65772d7068702d6c6f676f2e737667)](https://camo.githubusercontent.com/506f62e5d230ac25baad8edbafb58cb3f63ec2b28180b34460c93e72f0c302bb/68747470733a2f2f7777772e7068702e6e65742f2f696d616765732f6c6f676f732f6e65772d7068702d6c6f676f2e737667)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#2c2p-php-library-)

Usage
-----

[](#usage)

#### Step 1. Setup 2c2p Credentials

[](#step-1-setup-2c2p-credentials)

```
use CCPP\Config;
use CCPP\Locale;

$config               = Config::init();
$config->merchantId   = 'JT02';
$config->secretKey    = '72B8F060B3B923E580411200068A764610F61034AE729AB9EF20CAFF93AFA1B9';
$config->currencyCode = 'MMK';
$config->locale       = Locale::MYANMAR;
$config->baseUrl      = BaseUrl::SANDBOX;

```

#### Step 2. Prepare redirect API request payload

[](#step-2-prepare-redirect-api-request-payload)

```
use CCPP\Requests\RedirectApiRequest;

$invoiceNo = uniqid(); // Your invoice Number

$request                    = new RedirectApiRequest();
$request->amount            = 10000;
$request->frontendReturnUrl = 'https://example.com/';
$request->description       = 'Invoice Description';
$request->invoiceNo         = $invoiceNo;
$request->paymentChannel    = [PaymentChannel::CREDIT_CARD];
$request->customerName      = 'Zin Kyaw Kyaw';
$request->customerEmail     = 'necessarylion@gmail.com';

```

#### Step 3. Get redirect Url

[](#step-3-get-redirect-url)

```
use CCPP\RedirectApi;

$payment = new RedirectApi();
$url     = $payment->getUrl($request);

```

#### Step 4. Store payment token and invoiceNo in your database

[](#step-4-store-payment-token-and-invoiceno-in-your-database)

```
$paymentToken = $payload->paymentToken();

```

#### Step 5. On frontendReturnUrl inquiry payment using paymentToken and invoiceNo

[](#step-5-on-frontendreturnurl-inquiry-payment-using-paymenttoken-and-invoiceno)

```
$result = $payment->inquiryPayment(); // return PaymentInquiryResponse
$success = $payment->inquiryStatus(); // return boolean (true or false)

```

#### Other additional helpful functions

[](#other-additional-helpful-functions)

- `$payment->response()` get full api response

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

1360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/790f48f31f3770b92b73886358dfcd42b920f8f266a32f456e97fb54ee0f3f99?d=identicon)[necessarylion](/maintainers/necessarylion)

---

Top Contributors

[![zinkyawkyaw](https://avatars.githubusercontent.com/u/31363461?v=4)](https://github.com/zinkyawkyaw "zinkyawkyaw (5 commits)")[![necessarylion](https://avatars.githubusercontent.com/u/42437544?v=4)](https://github.com/necessarylion "necessarylion (4 commits)")

---

Tags

2c2p2c2p-laravel2c2p-php

### Embed Badge

![Health badge](/badges/bilions-2c2p-php/health.svg)

```
[![Health](https://phpackages.com/badges/bilions-2c2p-php/health.svg)](https://phpackages.com/packages/bilions-2c2p-php)
```

###  Alternatives

[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[docusign/esign-client

The Docusign PHP library makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-esign-php-client repository. Join the eSign revolution!

2087.4M13](/packages/docusign-esign-client)[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
