Quick Start

Import library to your project file.

<?php
// Manually installed project
require_once 'ipsp-php/autoload.php';
// If you are install SDK with composer
require_once 'vendor/autoload.php';

Define constants in project file or import from custom location.

<?php
define('MERCHANT_ID' , 'your_merchant_id');
define('MERCHANT_PASSWORD' , 'password');
define('IPSP_GATEWAY' , 'your_ipsp_gateway');

Create Ipsp_Client instance by passing configuration properties:

  • MERCHANT_ID - Checkout Merchant ID from provider admin panel.
  • MERCHANT_PASSWORD - Merchant password
  • IPSP_GATEWAY - Choose provider gateway.
<?php
$client = new Ipsp_Client( MERCHANT_ID , MERCHANT_PASSWORD, IPSP_GATEWAY );

Create Ipsp_Api instance by passing Ipsp_Client instance:

<?php
$ipsp   = new Ipsp_Api( $client );

Finally create bootstrap file init.php with content below:

<?php
require_once 'vendor/autoload.php';
define('MERCHANT_ID' , 'YOUR_MERCHANT_ID');
define('MERCHANT_PASSWORD' , 'PAYMENT_KEY' );
define('IPSP_GATEWAY' , 'api.fondy.eu');
$client = new Ipsp_Client( MERCHANT_ID , MERCHANT_PASSWORD, IPSP_GATEWAY );
$ipsp   = new Ipsp_Api( $client );

Now you can use Api Methods.