<?php
//require_once 'conf.php';
require_once 'allopass-apikit-php5/api/AllopassAPI.php';
$api = new AllopassAPI();

$response3 = $api->createButton(array(
 'site_id' => 273630, 
 'product_name' => 'Allopass Calling DE', 
 'forward_url'=> 'http://sd-20614.dedibox.fr/~jabella/notif/notif.php', 
 'notification_url' => 'http://sd-20614.dedibox.fr/~jabella/notif/notif.php', 
 'amount' => '1.99', 
 'reference_currency' => 'EUR', 
 'price_mode' => 'price', 
 'price_policy' => 'high-only',
 'data' => 'bla blab bla',
 'merchant_transaction_id' => 'TRANS765',
 'country' => array('DE'),
 'type' => array('mobile')
));

$response = $api->prepareTransaction(array(
 'site_id' => 273630, 
 'pricepoint_id' => 480, 
 'product_name' => 'Allopass Calling DE', 
 'forward_url'=> 'http://sd-20614.dedibox.fr/~jabella/notif/notif.php', 
 'notification_url' => 'http://sd-20614.dedibox.fr/~jabella/notif/notif.php', 
 'reference_currency' => 'EUR', 
 'data' => '',
 'merchant_transaction_id' => 'TRANS765',
 'country' => array('DE'),
 'type' => array('mobile')
));
//echo $response; 
$url = $response->getBuyUrl();


//$url = $response3->getBuyUrl() . '&forward_target=current';
 echo '<br><a href="'.$url . '" >'.$url.'</a>';
 
 