PHPackages                             codpay/php-sdk - 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. [Payment Processing](/categories/payments)
4. /
5. codpay/php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

codpay/php-sdk
==============

CodPay Payment GateWay

v1.0.0(2y ago)010MITPHPPHP &gt;=5.3.0

Since Jun 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fbone1175/codpay-php-sdk)[ Packagist](https://packagist.org/packages/codpay/php-sdk)[ RSS](/packages/codpay-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

CodPay SDK for PHP
==================

[](#codpay-sdk-for-php)

Esta biblioteca fornece aos desenvolvedores um conjunto simples de vínculos para ajudá-lo a integrar a API do Codpay a um site e começar a receber pagamentos via pix, card, transfe.

Utílização
----------

[](#utílização)

Primeiros passos com pagamento por meio dos formulários do seu próprio site

```
require_once 'vendor/autoload.php';

use CodPay\Api\Amount;
use CodPay\Api\Payer;
use CodPay\Api\Payment;
use CodPay\Api\RedirectUrls;
use CodPay\Api\Transaction;

    $payer = new Payer();
    $payer->setPaymentMethod('Pix');

    $amountIns = new Amount($amount);
    $amountIns->setTotal($amount)
    ->setCurrency('BRL')
    ->setReferencia($txid);

    $trans = new Transaction();
    $trans->setAmount($amountIns);

    $urls = new RedirectUrls();
    $urls->setSuccessUrl($dominio.'/notification/ipn.php')
    ->setCancelUrl ($dominio.'/cancel');

    $payment = new Payment();
    $payment->setCredentials(
      ['client_id' => $client_id,
        'client_secret' => $client_secret,
      ])
    ->setRedirectUrls($urls)
    ->setPayer($payer)
    ->setTransaction($trans);
    try {

       $payment->create();

      if ($payment->getApprovedUrl() == false) {
        echo 'Metodo de pagamento indisponivel no momento.';
        exit;
      }

      $jsonData = file_get_contents($payment->getApprovedUrl());
      $arrayData = json_decode($jsonData, true);

      //QrCode e code
      $qrcode = $arrayData["data"]["qrcode"];
      $copia_cola = $arrayData["data"]["qrcopy"];

    } catch (\Exception $ex) {
      print $ex; exit;
    }
```

Requisitos
----------

[](#requisitos)

- Necessário PHP 7.0 ou superior

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

760d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/70772993?v=4)[Fernando Bonner](/maintainers/fbone1175)[@fbone1175](https://github.com/fbone1175)

---

Top Contributors

[![fbone1175](https://avatars.githubusercontent.com/u/70772993?v=4)](https://github.com/fbone1175 "fbone1175 (4 commits)")

### Embed Badge

![Health badge](/badges/codpay-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/codpay-php-sdk/health.svg)](https://phpackages.com/packages/codpay-php-sdk)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)[patryqhyper/polish_payments_api

Library for polish payment providers

141.6k](/packages/patryqhyper-polish-payments-api)

PHPackages © 2026

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