2017 © Pedro Peláez
 

library envoypayments

EnvoyPayments API library

image

moult/envoypayments

EnvoyPayments API library

  • Thursday, July 9, 2015
  • by Moult
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

envoypayments

This is a PHP library to help you talk to the EnvoyPayments API., (*1)

It's so tiny it's probably not even worth using., (*2)

If you have any ideas on how to bloat it up feel free to send a PR., (*3)

$ composer require moult/envoypayments:dev-master --prefer-dist
<?php

include 'vendor/autoload.php';

$client = new \Moult\Envoypayments\Client('7847b08b123f7f3ecf84e133ec635fc989d42b26');

try 
{
    $pay = $client->request('post', 'charges', [
        'amount' => '2.00',
        'currency' => 'AUD',
        'customer' => [
            'first_name' => 'John',
            'last_name' => 'Doe',
            'email' => 'dion@thinkmoult.com',
            'payment_source' => [
                'gateway_id' => '559e129d90f5d99a05afbaae',
                'card_name' => 'John Doe',
                'card_number' => '4111111111111111',
                'expire_month' => '01',
                'expire_year' => '17',
                'card_cvv' => '123'
            ]
        ]
    ]);
}
catch (\Exception $e)
{
    $r = $e->getResponse();
    throw new \Exception('A fatal transaction error occured - '.$r->getStatusCode().' '.$r->getBody()->getContents());
}

The Versions

09/07 2015

dev-master

9999999-dev

EnvoyPayments API library

  Sources   Download

MIT

The Requires

 

api payments envoy envoypayments