-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathMidtrans.php
33 lines (28 loc) · 904 Bytes
/
Midtrans.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
<?php
/**
* Check PHP version.
*/
if (version_compare(PHP_VERSION, '5.4', '<')) {
throw new Exception('PHP version >= 5.4 required');
}
// Check PHP Curl & json decode capabilities.
if (!function_exists('curl_init') || !function_exists('curl_exec')) {
throw new Exception('Midtrans needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('Midtrans needs the JSON PHP extension.');
}
// Configurations
require_once 'Midtrans/Config.php';
// Midtrans API Resources
require_once 'Midtrans/Transaction.php';
// Plumbing
require_once 'Midtrans/ApiRequestor.php';
require_once 'Midtrans/Notification.php';
require_once 'Midtrans/CoreApi.php';
require_once 'Midtrans/Snap.php';
require_once 'SnapBi/SnapBi.php';
require_once 'SnapBi/SnapBiApiRequestor.php';
require_once 'SnapBi/SnapBiConfig.php';
// Sanitization
require_once 'Midtrans/Sanitizer.php';