PHPackages                             gabrielchavezme/srpago - 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. [API Development](/categories/api)
4. /
5. gabrielchavezme/srpago

ActiveLibrary[API Development](/categories/api)

gabrielchavezme/srpago
======================

SrPago Dev PHP Library

1.0.0(5y ago)040MITPHPPHP &gt;=5.3.3

Since Jul 26Pushed 5y agoCompare

[ Source](https://github.com/gabrielchavezme/srpago)[ Packagist](https://packagist.org/packages/gabrielchavezme/srpago)[ Docs](https://srpago.com/)[ RSS](/packages/gabrielchavezme-srpago/feed)WikiDiscussions master Synced today

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

SrPago PHP bindings
===================

[](#srpago-php-bindings)

You can sign up for a SrPago account at .

Requirements
------------

[](#requirements)

PHP 5.3.3 and later.

Composer - Installation
-----------------------

[](#composer---installation)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require srpago/ecommerce/srpago_php
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/00-intro.md#autoloading):

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

Manual - Installation
---------------------

[](#manual---installation)

If you do not wish to use Composer, you can download the [latest release](https://github.com/srpago-dev/srpago-php). Then, to use the bindings, include the `init.php` file.

```
//Required
include_once '/vendor/srpago/ecommerce/srpago_php/init.php';
```

Dependencies
------------

[](#dependencies)

The bindings require the following extension in order to work properly:

- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started
---------------

[](#getting-started)

Simple usage looks like:

```
/// Librerías requeridas
  include_once 'vendor/ecommerce/srpago_php/init.php';

  /// Configuración de ambiente
  \SrPago\SrPago::setLiveMode(false);
  \SrPago\SrPago::setApiKey('KEY');
  \SrPago\SrPago::setApiSecret('SECRET');

  /// Parámetros de cobro
  $chargeParams = array(
       "amount"=>10.0,
       "description" => "demo de cargo directo con token tok_5ac666440e35f",
       "reference"=> "AB98XXCVBD",
       "ip"=> "189.203.45.58",//OPTIONAL REMOTE IP
       "latitude"=> "-9.11111111",//OPTIONAL REMOTE IP
       "longitude"=> "9.999999",//OPTIONAL REMOTE IP
       //"installments"=>3,    //OPTIONAL  Montly installments 3,6,9,12
       "source"=>"tok_dev_5b32c39085517" //TOKEN CARD REQUIRED
     );

     ///Agrega información de metadata
     /// see more information in “Metadata Object” section
     $metadata = array(
       "items"=>array(
          "item" => array(
              array(
                "itemNumber"=> "193487654",
                "itemDescription"=> "iPhone 6 32gb",
                "itemPrice"=> "599.00",
                "itemQuantity"=> "1",
                "itemMeasurementUnit"=> "Pza",
                "itemBrandName"=> "Apple",
                "itemCategory"=> "Electronics",
                "itemTax"=> "12.95"
            ),
          )
        )
     );
     $chargeParams['metadata'] = $metadata;

try {
     /// Procesar cobro
     $chargesService = new \SrPago\Charges();
     $charge = $chargesService->create($chargeParams);

}catch(\SrPago\Error\SrPagoError $ex){

}
```

Documentation
-------------

[](#documentation)

Please see  for up-to-date documentation.

Legacy Version Support
----------------------

[](#legacy-version-support)

If you are using PHP 5.2, you can download v1.18.0 ([zip](https://github.com/srpago/srpago-php/archive/v1.18.0.zip), [tar.gz](https://github.com/srpago/srpago-php/archive/v1.18.0.tar.gz)) from our [releases page](https://github.com/srpago/srpago-php/releases). This version will continue to work with new versions of the SrPago API for all common uses.

Development
-----------

[](#development)

Install dependencies:

```
composer install
```

### SSL / TLS configuration option

[](#ssl--tls-configuration-option)

See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to ensure that your plugin can be used on all systems, you should add a configuration option to let your users choose between different values for `CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

2115d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db3e78dbc76b37edda9896b132bb454f6e322c42043a7b07f23e668359e9ac9d?d=identicon)[gabrielchavezme](/maintainers/gabrielchavezme)

---

Top Contributors

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

---

Tags

apipayment processingcard-paymentsrpago

### Embed Badge

![Health badge](/badges/gabrielchavezme-srpago/health.svg)

```
[![Health](https://phpackages.com/badges/gabrielchavezme-srpago/health.svg)](https://phpackages.com/packages/gabrielchavezme-srpago)
```

###  Alternatives

[ebanx/ebanx

EBANX PHP library

24648.5k](/packages/ebanx-ebanx)[pay-now/paynow-php-sdk

PHP client library for accessing Paynow API

18193.9k2](/packages/pay-now-paynow-php-sdk)[everypay/everypay-php

1742.0k](/packages/everypay-everypay-php)

PHPackages © 2026

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