[insert_php]
require( ‘class-IXR.php’ );
//define the tmt.spreedly.addBooking method
$method = ‘tmt.spreedly.addBooking’;

//deprecated, set to zero
$site_id = 0;

if( isset($_POST[‘payment_method_token’]) )
{
//add username supplied by Trust My Travel
$username = ‘Ride Down South’;

//add password supplied by Trust My Travel
$password = ”;

//create booking_data array
$booking_data = [‘firstname’ => $_POST[‘first_name’],
‘surname’ => $_POST[‘last_name’],
’email’ => $_POST[’email’],
‘address’ => $_POST[‘address’],
‘city’ => $_POST[‘city’],
‘country’ => $_POST[‘country’],
‘postcode’ => $_POST[‘postcode’],
‘currency’ => ‘ZAR’,
‘total’ => $_POST[‘amount’],
‘line_items’ => ‘All expenses paid holiday’,
‘payment_method_token’ => $_POST[‘payment_method_token’]
//this will be generated by the Spreedly onsubmit method
];

//init
$client = new IXR_Client( ‘staging.trustmytravel.com’, ‘/xmlrpc.php’, 80, 75 );

//query
//$client->query( $method, $site_id, $username, $password, $booking_data );
}
else {
[/insert_php]




R






Payment Details



/



[insert_php]
}
[/insert_php]