eresults/transip-api

Transip API client that can work with Heroku

Installs: 1 191

Dependents: 0

Stars: 2

Watchers: 3

Language: PHP

5.1.1 2014-12-17 13:25 UTC

README

Added Transip_ApiSettings::$soapOptions so you can add extra options to SoapClient (http://php.net/manual/en/soapclient.soapclient.php).

I made this adjustment to make it possible to communicate with Transip from Heroku (http://heroku.com). Heroku doesn't have a fixed IP range so it's not possible to add a trusted IP (https://www.transip.nl/cp/mijn-account/#api).

Installation

Download the files or add "eresults/transip-api": "dev-master" to composer.json.

Examples

Proximo (https://addons.heroku.com/proximo)

Add the code below to your bootstrap file and add the IP you get from Proximo to the transip trusted IP list.

$parsed = parse_url( getenv( 'PROXIMO_URL' ) );
Transip_ApiSettings::$soapOptions = array( 
  'proxy_host' => $parsed['host'],
  'proxy_port' => isset( $parsed['port'] ) ? $parsed['port'] : 80,
  'proxy_login' => $parsed['user'],
  'proxy_password' => $parsed['pass']
);

Disclaimer

This repo is based on TransipAPI 4.2 (https://api.transip.nl) and in no way affiliated with or endorsed by TransIP.