Beispiel #1
0
<?php

//autoload
require_once dirname(__FILE__) . "/../models/API/Autoloader.php";
//load config
if (file_exists("config/config.php")) {
    include "config/config.php";
} else {
    include "../config/config.php";
}
$ideal = new gatewayController();
if (isset($_GET['gateway'])) {
    $ideal->startTransaction($_GET['gateway']);
}
class gatewayController
{
    private $api_key = '';
    private $api_url = '';
    function __construct()
    {
        $this->api_key = API_KEY;
        $this->api_url = API_URL;
    }
    function getGateways()
    {
        $msp = new Client();
        $msp->setApiKey($this->api_key);
        $msp->setApiUrl($this->api_url);
        try {
            $query_string = 'country=NL&currency=USD&amount=1000&locale=nl-NL';
            $gateways = $msp->gateways->get($endpoint = 'gateways', $type = '', array(), $query_string);