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(1y ago)010MITPHPPHP &gt;=5.3.0

Since Jun 3Pushed 1y 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 1mo ago

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

21

—

LowBetter than 18% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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

714d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77b27d7294955afdcd0ada76c0717b65268012d30f77174a81700dd61a206977?d=identicon)[fbone1175](/maintainers/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

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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