2017 © Pedro Peláez
 

library compropago-api

PHP integration for compropago.com API

image

hechoendrupal/compropago-api

PHP integration for compropago.com API

  • Monday, June 23, 2014
  • by dmouse
  • Repository
  • 1 Watchers
  • 1 Stars
  • 144 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 12 % Grown

The README.md

ComproPago API

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Instalation

  • Via composer
$ curl -sS https://getcomposer.org/installer | php
$ cat composer.json
{
    "require": {
      "hechoendrupal/compropago-api": "~1.0"
    }
}
$ ./composer.phar install

Usage

use HechoEnDrupal\ComproPago\Api;
use HechoEnDrupal\ComproPago\Charge;
use HechoEnDrupal\ComproPago\Customer;

require __DIR__ . 'vendor/autoload.php';

// ...

$api = new Api($api_key);
$product = $api->createCharge($charge);
$status = $api->getCharge($product['payment_id']);
$sms = $api->createSMS($customer,$product['payment_id']);

Webhooks

use HechoEnDrupal\ComproPago\Webhook;

$webhook = new WebHook();

// Charge data
print $webhook->getAmount()."\n";
print $webhook->getCreated($format=null)."\n";
print $webhook->getID()."\n";
print $webhook->getShortID()."\n";
if ($webhook->paid()) {
  print "Paid\n";
}

// Payment Details
$payment = $webhook->getPaymentDetails();
print "Payment Details"."\n";
print $payment->getStore()."\n";
print $payment->getProductID()."\n";
print $payment->getCustomerPhone()."\n";
print $payment->getCustomerEmail()."\n";
print $payment->getCountry()."\n";

More information in examples section, (*2)

The Versions

23/06 2014

dev-master

9999999-dev

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

The Development Requires

23/06 2014

1.1.1

1.1.1.0

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

The Development Requires

19/06 2014

1.1.0

1.1.0.0

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2014

dev-beta1

dev-beta1

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2014

1.0.1

1.0.1.0

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

The Development Requires

13/06 2014

0.1

0.1.0.0

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

13/06 2014

1.0

1.0.0.0

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires

 

05/03 2014

v1.0beta1

1.0.0.0-beta1

PHP integration for compropago.com API

  Sources   Download

MIT

The Requires