[freeside-commits] freeside/fs_selfservice/php freeside_order_pkg_example.php, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Mon Sep 20 14:27:00 PDT 2010
Update of /home/cvs/cvsroot/freeside/fs_selfservice/php
In directory wavetail.420.am:/tmp/cvs-serv3652
Added Files:
freeside_order_pkg_example.php
Log Message:
adding
--- NEW FILE: freeside_order_pkg_example.php ---
<?php
require('freeside.class.php');
$freeside = new FreesideSelfService();
$response = $freeside->order_pkg( array(
'session_id' => $_POST['session_id'],
'pkgpart' => 15, #Freesize 25
#if needed# 'svcpart' =>
'id' => $_POST['id'], #unique integer ID
'name' => $_POST['name'], #text name
) );
$error = $response['error'];
if ( ! $error ) {
// sucessful order
$pkgnum = $response['pkgnum'];
$svcnum = $response['svcnum'];
error_log("[order_pkg] package ordered pkgnum=$pkgnum, svcnum=$svcnum");
// store svcnum, to be used for the customer_status call
} else {
// unsucessful order
error_log("[order_pkg] error ordering package: $error");
// display error message to user
}
?>
More information about the freeside-commits
mailing list