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

ActiveLibrary[API Development](/categories/api)

blogui91/srpago-php
===================

SrPago PHP Library

1.0.0(4y ago)020MITPHPPHP &gt;=5.3.3

Since Jul 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/blogui91/srpago-php)[ Packagist](https://packagist.org/packages/blogui91/srpago-php)[ Docs](https://srpago.com/)[ RSS](/packages/blogui91-srpago-php/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (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/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/php-restclient-master/restclient.php';
include_once '/vendor/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:

```
SrPago::setLiveMode(false);
SrPago::setApiKey('999999seere4-6e52-449d-83d0-898294843222');
SrPago::setApiSecret('Absjrj432002$$.4322');

/// Parámetros de cobro
$chargeParams = array(
     "amount"=>9.0,
     "description" => "demo de cargo directo con token", //OPTIONAL DESCRIPTION
     "reference"=> "AB98XXCVBD",//OPTIONAL REFERENCE ID
     "ip"=> "189.203.45.58",//OPTIONAL REMOTE IP
     //"latitude"=> "-9.11111111",//OPTIONAL LATITUDE
     //"longitude"=> "9.999999",//OPTIONAL LONGITUDE
     //"installments"=>3,    //OPTIONAL Montly installments 3,6,9,12
     "source"=>"tok_5966f0cdd3697"
   );

   //Include Metadata
   $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;

$chargesService = new \SrPago\Charges();

$charge = $chargesService->create($chargeParams);

echo $charge;
```

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.

This legacy version may be included via `require_once("/path/to/srpago-php/lib/SrPago.php");`, and used like:

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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

1765d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

apipayment processingcard-paymentsrpago

### Embed Badge

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

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

###  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)
