Table Of Contents
Posting Charges to Your PMS Remotely
Posting Charges to Your PMS Remotely
BBSM provides an API for developers to implement an application that enables you to remotely post charges to the PMS through the BBSM server. This API consists of one procedure, PostCharge, in a Microsoft MFC extension DLL named IPORTPost.dll.
To post charges remotely using the IPORTPost.dll, you need to create an MFC application that will call the PostCharge function. Your application will run on a remote computer, not on the BBSM server.
Cisco recommends using one of these platforms for the remote computer:
•
Windows NT 4.0
•
Windows 2000 (Professional or Server)
Use the following instructions to install, configure, and use the API.
Step 1
Modify the following regedit file by specifying the IP address of the BBSM server in the ServerAddress value. Then run the regedit file on the remote computer where your application will run and on the BBSM server.
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Atcom/Info, Inc.\IPORT Server]
"KioskListenPort"=dword:00001b40
"ServerAddress"="1.2.3.4"
Caution 
For this application to work properly, you must run this regedit file on both BBSM and the remote computer where your application will run.
Step 2
On the BBSM server, open the AtDial service. From the Start menu, choose Start > Programs > Administrative Tools >Services and double-click AtDial.
Step 3
Stop and restart the AtDial service.
Step 4
To install the API, copy the IPORTPost.dll to a directory in the search path on the remote computer where your application will run, as shown below:
•
From the IPORTPost directory on the BBSM CD
•
To a directory in the Windows Path environment variable on the remote computer
Step 5
Create a Visual C++ application with MFC support. (Note that the IPORTPost.dll uses the CSocket class, so your application must have MFC support.) The example below describes a simple way to create the application:
a.
Open Microsoft Developer Studio 6.0 Visual C++.
b.
Select File > New.
c.
Select the Projects tab. (See Figure F-1.)
Figure F-1 New Window, Projects Tab
d.
Select Win32 Console Application.
e.
Enter a project name for your application and click OK. The Win32 Console Application - Step 1 of 1 dialog box opens. (See Figure F-2.)
Figure F-2 Win32 Console Application - Step 1 of 1 Dialog Box
f.
Select An application that supports MFC and then click Finish. The New Project Information dialog box opens. (See Figure F-3.)
Figure F-3 New Project Information Window
g.
Review the new project information and click OK.
Step 6
Add the following declaration for PostCharge to your header file (see Figure F-4):
#define DLLEntry__declspec( dllimport )
DLLEntry bool __cdecl PostCharge
(
int nSiteNumber, // The site (hotel) associated with the charge
const char* pszRoom, // The room identification
const char* pszDescription, // Matches Description in BBSM server's
CallTypeLookup Table
double dAmount // Amount to post
);
Figure F-4 Header File
Step 7
To use the API, invoke PostCharge from your application for each charge to be posted. If the charge posts successfully to BBSM, the return value is true. Otherwise, it is false. The following are all of the input parameters:
int nSiteNumber
BBSM site number of the hotel where the target PMS system is connected.
const char* pszRoom
Room number to be charged.
const char* pszDescription
Type of charge.
double dAmount
Amount of charge in dollars; for example, 1.47 is $1.47.
Step 8
Build your application in Microsoft Developer Studio 6.0 Visual C++ as a release project.