PHP code example of kosatyi / ipsp-php
1. Go to this page and download the library: Download kosatyi/ipsp-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kosatyi / ipsp-php example snippets
// Manually installed project
oser
define('MERCHANT_ID' , 'your_merchant_id');
define('MERCHANT_PASSWORD' , 'password');
define('IPSP_GATEWAY' , 'your_ipsp_gateway');
$client = new Ipsp_Client( MERCHANT_ID , MERCHANT_PASSWORD, IPSP_GATEWAY );
$ipsp = new Ipsp_Api( $client );
e('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 );
= $ipsp->call('checkout',array(
'order_id' => 'orderid-111222333',
'order_desc' => 'Simple checkout page',
'currency' => $ipsp::USD ,
'amount' => 2000, // 20 USD
'response_url'=> sprintf('http://shop.example.com/result.php')
))->getResponse();
// redirect to checkout page
$data->redirectToCheckout();
lt = $api->call('result');
if( $result->validResponse() ){
exit(sprintf('<pre>%s</pre>',$result->getResponse()));
}
cmd
git clone [email protected] :kosatyi/ipsp-php.git
cmd
composer