forked from sostenesgomes/pagarme-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pagarme.php
45 lines (39 loc) · 1.63 KB
/
Pagarme.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
if (!function_exists('curl_init')) {
throw new Exception('PagarMe needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('PagarMe needs the JSON PHP extension.');
}
// function __autoload($class){
//
// $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "Pagarme" . DIRECTORY_SEPARATOR;
//
// $file = $dir . ((strstr($class, "PagarMe_")) ? str_replace("PagarMe_", "", $class) : $class) . ".php";
//
// if (file_exists($file)){
// require_once($file);
// return;
// }else{
// throw new Exception("Unable to load" .$class);
// }
// }
require(dirname(__FILE__) . '/lib/Pagarme/PagarMe.php');
require(dirname(__FILE__) . '/lib/Pagarme/Set.php');
require(dirname(__FILE__) . '/lib/Pagarme/Object.php');
require(dirname(__FILE__) . '/lib/Pagarme/Util.php');
require(dirname(__FILE__) . '/lib/Pagarme/Error.php');
require(dirname(__FILE__) . '/lib/Pagarme/Exception.php');
require(dirname(__FILE__) . '/lib/Pagarme/RestClient.php');
require(dirname(__FILE__) . '/lib/Pagarme/Request.php');
require(dirname(__FILE__) . '/lib/Pagarme/Model.php');
require(dirname(__FILE__) . '/lib/Pagarme/CardHashCommon.php');
require(dirname(__FILE__) . '/lib/Pagarme/TransactionCommon.php');
require(dirname(__FILE__) . '/lib/Pagarme/Transaction.php');
require(dirname(__FILE__) . '/lib/Pagarme/Plan.php');
require(dirname(__FILE__) . '/lib/Pagarme/Subscription.php');
require(dirname(__FILE__) . '/lib/Pagarme/Customer.php');
require(dirname(__FILE__) . '/lib/Pagarme/Address.php');
require(dirname(__FILE__) . '/lib/Pagarme/Phone.php');
require(dirname(__FILE__) . '/lib/Pagarme/Card.php');
?>