METHOD OF AND SYSTEM FOR MAKING PURCHASES OVER A COMPUTER NETWORK

Abstract: A method of and system (10) for making purchases over a computer network using an ATM card or the like is provided. In accordance with the invention, a consumer (12) transmits his ATM card number over the network (24) to an on-line merchant (16). The on-line merchant (16) then forwards the ATM card number to a third party contractor (20), such as a bank, that will oversee and authorize the transaction. Simultaneously or thereafter, the consumer (12) transmits his PIN over the network to the third party contractor (20), who verifies that the ATM card number and PIN are valid.

Description: TITLE OF THE INVENTION Method of and System for Making Purchases Over a Computer Network BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention generally relates to a method of and system for making purchases over a computer network and, more particularly, to a method of and system for making purchases of goods and services over the Internet or other non-secure computer network using an automated-teller-machine (ATM) card, debit card or any other card which may require a valid personal-identification-number (PIN) for transaction authorization. 2. Description of the Prior Art The use of personal computers by consumers to purchase goods and services over the Internet via the World Wide Web and e-mail has become very popular in recent years and constitutes an ever-increasing part of the economy. In making a purchase over the Internet, the typical consumer uses a credit card or ATM card. After making his purchase selection, the consumer transmits his card information over the Internet to the on-line merchant. The on-line merchant then contacts the issuing bank to verify the card information and obtain authorization to complete the transaction. Depending on the response from the bank, the on-line merchant either accepts or rejects the purchase. Because the Internet is a non-secure (i.e., public) network, there is a danger that the consumer's credit card or ATM card information will be intercepted by a third party. If that third party is dishonest, he can make illegal charges to the credit card or, in the case of an ATM card, remove money directly from the consumer's bank account. In recent years, numerous approaches have been implemented to reduce this security risk. The most popular approach has been sophisticated encryption techniques which render the credit card or ATM card data virtually unreadable to third parties, such as 128-bit secure-sockets-layer (SSL) encryption. When making purchases over the Internet using an ATM card, however, security considerations take on an added importance because, unlike with transactions at ATM machines, PINs are presently not used in ATM transactions on the Internet. Thus, should the ATM card number fall into the hands of an unscrupulous third party, the card-holder's entire bank account can be wiped out through fraudulent Internet transactions. One way to overcome this problem is to require the use of PINs in ATM transactions on the Internet. This has not been possible to date, however, because on-line merchants do not have the ability to verify PINs. Additionally, it is not desirable to provide the on-line merchant with both the ATM card number and the corresponding PIN since unscrupulous employees of the on-line merchant can use the PIN to illegally access the card-holder's bank account and withdraw money therefrom. Accordingly, it is an object of the present invention to provide a new method of and system for making purchases over the Internet using an ATM card wherein a valid PIN is required in order to obtain authorization for a given transaction. It is another object of the present invention to provide a new method of and system for making purchases over the Internet using an ATM card wherein a valid PIN is required in order to obtain authorization for a given transaction, and wherein the PIN is not supplied to the on-line merchant. SUMMARY OF THE INVENTION In accordance with a first aspect of the present invention, a method of making purchases over a non-secure computer network using an ATM card is provided. In accordance with said method, a consumer transmits his ATM card number over the network to an on-line merchant. The on-line merchant then forwards the ATM card number to a third party contractor, such as a bank, that will oversee and authorize the transaction. Simultaneously or thereafter, the consumer transmits his PIN over the network to the third party contractor, bypassing the on-line merchant. Having both the ATM card number and the PIN, the third party contractor verifies that the ATM card number and PIN are correct, checks for sufficiency of funds, and either authorizes or denies the transaction. The authorization or denial is communicated to the on-line merchant over the network, who either completes or rejects the purchase and so notifies the consumer. In accordance with a second aspect of the present invention, a system for making purchases over a non-secure computer network using an ATM card is provided. The system includes first, second and third computers connected to a computer network. The first computer transmits the consumer's ATM card number over the network to the second computer, which is operated by or for the on-line merchant. The second computer forwards the ATM card number over the network to the third computer, which is operated by or for the third party contractor. Simultaneously or thereafter, the first computer transmits the consumer's PIN over the network to the third computer, bypassing the second computer. The third computer then verifies that the ATM card number and PIN are correct and that there are sufficient funds in the bank account to cover the transaction amount. The third computer then transmits the results of the verification procedure to the second computer. Depending on the verification results, the purchase is either completed or rejected. The present invention will now be described in detail, with frequent reference being made to the drawings identified below. BRIEF DESCRIPTION OF THE DRAWINGS In the accompanying drawings: figure 1 is a block diagram of a system in accordance with one embodiment of the present invention; figure 2 is a flow chart which illustrates the operation of the system of figure 1; figure 3 shows a possible graphical user interface which can be used to enable the consumer to enter and transmit his PIN to the third party contractor; figure 4 is a diagram which summarizes the flow of data through the system of figure 1. DESCRIPTION OF THE PREFERRED EMBODIMENT A system 10 in accordance with one embodiment of the present invention is schematically shown in figure 1. The system 10 includes a first computer 12 at a consumer location 14, a second computer 16 at an on-line merchant location 18, and a third computer 20 at a third party contractor location 22. The three computers 12, 16, 20 are connected together over a computer network 24 which, for purposes of this discussion, is the Internet, although the present invention may be practiced on any public or private computer network or combination thereof. As those of ordinary skill in the art know, the Internet 24 is a complex and amorphous computer network that comprises thousands of nodes and components and over which signals are transmitted by, inter alia, telephone lines, satellites and optical fibers. The first computer 12, which will generally be located at the consumer's home or business (consumer location 14), will typically be a conventional personal computer (PC) that includes a chassis that houses a central processing unit (CPU) and supporting circuitry, as well as a floppy drive, a hard drive and an internal modem. Connected to the CPU through the chassis are a keyboard, a mouse and a monitor. The keyboard and mouse are used by the consumer to control the operation of the first computer 12 and to input information into the first computer 12. The first computer 12 will usually be coupled to the Internet via a telephone line connected to the modem, although the computer can be connected to the Internet via a high speed data transmission line. The consumer will typically connect to the Internet using an Internet service provider, such as Erols™ or America OnLine™, but may have a direct connection to the Internet. Although a conventional PC will typically be used by the consumer, the consumer may use any type of computer that can be connected to the Internet, including a work station on a local area network, and any operating system. The particular details of the first computer 12 are largely rrrelevant to the present invention. The first computer 12 merely serves as a convenient interface for the consumer to place orders for goods and services over the Internet. Next shown in figure 1 is the second computer 16 which is located at the on-line merchant location 18. The second computer 16 will preferably be a more powerful machine than a personal computer, such as a workstation, although a personal computer may also be used by the on-line merchant. Again, the particular details of the second computer 16 are largely irrelevant to the present invention. Typically, the second computer 16 will be a Web server (a computer that provides direct access to the World Wide Web on the Internet and includes the necessary hardware, operating system, Web server software, TCP/IP protocols and Web site content) owned and operated by the on-line merchant or by an Internet service provider with whom the on-line merchant has contracted. For purposes of this discussion, the online merchant location 18 refers to the location of the second computer 16, and not necessarily the actual physical location of the on-line merchant. Preferably, the second computer 16 will be running Windows NT™ 4.0, using Internet Information Server™ 4.0 and Commerce Server™ 3.0. The CPU of the second computer 16 must have acceptable power and should have at least 64 megabytes of RAM. The second computer 16 will typically have an on-line catalog in memory which can be accessed and browsed by the consumer over the Internet 24 through an appropriate graphical use interface (GUI) supplied by the on-line merchant. Next shown in figure 1 is the third computer 20 which is located at the third party contractor location 22. The third party contractor is an independent, insured organization, such as a bank, that has contracted with the on-line merchant to provide ATM services. Although the third computer 20 can be a personal computer, as with the second computer 16 it will preferably be a much more powerful machine, such as a workstation. The third computer 20 is likewise preferably a Web server owned and operated by the third party contractor or by an Internet service provider with whom the third party contractor has contracted. The third party contractor location 22 refers to the location of the third computer 20 and not necessarily the actual physical location of the third party contractor. As with the first and second computers 12, 16, the particular details of the third computer 20 are largely irrelevant to the present invention, so long as the third computer 20 is capable of performing the functions described herein. Preferably, the third computer is Compaq ProLiant™ server running at 500 MHZ with 128 MB RAM and using Windows NT™ 4.0. The flow chart 26 provided in figure 2 illustrates the operation of the system 10. As shown in block 28, the consumer initially establishes a connection over the Internet between the first computer 12 and the second computer 16 by accessing the on-line merchant's Web site using a commercially available browser, such as Internet Explorer™ or Netscape Navigator™. Then, as shown in blocks 30 and 32, using a GUI supplied by the on-line merchant, the consumer browses the on-line catalog, selecting which goods and/or services he wishes to purchase. Once the consumer makes his selection and is ready to place an order, the consumer transmits a purchase order message over the Internet to the on-line merchant (block 34). The consumer is then prompted for his payment information, as indicated in block 36, which for purposes of the present discussion is an ATM card number and expiration date, although the payment information can include additional data such as the consumer's name and address. The consumer then transmits his payment information over the Internet to the on-line merchant, as indicated in block 38. As used herein, the term "ATM card" includes bank cards, debit cards and any other cards for which the issuing bank or organization may require a valid PIN for use. The payment information is transmitted over the Internet using an encrypted connection, such as 128-bit encryption SSL. When the on-line merchant receives the ATM card number, or earlier, the second computer 16 creates a unique session identifier by combining the consumer's IP address, which uniquely identifies the consumer, with a date/time stamp. The ATM card number is then forwarded, or echoed, over the Internet by the second computer 16 to the third computer 20 at the third party contractor location 22 (block 40), along with the unique session identifier, a merchant id which uniquely identifies the on-line merchant, a terminal id which identifies the terminal being used by the on-line merchant, the expiration date of the ATM card and the purchase price. This data package is stored in memory on the third computer in a queue. Once again, 128-bit encryption SSL is preferably used. The data package transmitted by the second computer 16 to the third computer 20 is preferably transmitted in an industry standard format, such as ISO 8583 or VISA-K format. However, the present invention is not limited to any particular format and may be used with any format which an on-line merchant might desire. A sample computer program written in Java which creates the unique session identifier and formats the data package is provided in Appendix A. This program is designed to run as an Active Server Page on Internet Server 4.0 under Windows NT 4.0, although the program can be used on other platforms and programming environments, and can readily be implemented by one of ordinary skill in the art. No express or implied license is granted herein to reproduce, prepare derivative works, distribute copies, display, or otherwise use the program attached hereto as Appendix A, except that the program may be reproduced as an appendix to a patent issuing herefrom. Simultaneously or soon thereafter, the second computer executes a hyperlink to the third computer and the consumer is prompted by the third computer to input his PIN (block 42). The consumer inputs his PIN into the first computer 12 and transmits it over the Internet to the third computer 20 (block 44). The connection between the first computer 12 and third computer 20 is encrypted and independent of the connection between the first computer 12 and the second computer 16 so that the on-line merchant is never in possession of the PIN. As with the second computer 16, the first computer 12 transmits the unique session identifier, the merchant id, the terminal id, the expiration date of the ATM card and the purchase price to the third computer 20 along with the PIN in a data package. Figure 3 shows a typical GUI 46 which may be supplied by the third-party contractor and which pops up on the consumer's screen to allow the consumer to enter his PEST and transmit it to the third party contractor. As is clear from figure 3, the GUI 46 emulates an actual ATM machine and includes a simulated key pad 48 and a screen 50. The screen 50 indicates the on-line merchant's name and mailing address 52 and the purchase price 54. Using his mouse, the consumer inputs his PIN, as shown by the series of dots 56. By pressing the SUBMIT button 58, the PIN number is transmitted to the third party contractor. If the consumer makes a mistake, he presses the CLEAR button 60 and re-types his PIN. If the consumer needs help from the third party contractor, he simply presses the HELP button 62, which causes a help menu provided by the third party contractor to pop up on the screen, which may then be navigated by the consumer. The third computer 20 next verifies that the ATM card number and PIN are valid (block 64). Because the third-party contractor may be overseeing multiple transactions at any given time, the third computer 20 must synchronize the data packages received from the first and second computers 12, 16. To do this, the third computer 20 matches the unique session identifier, the merchant id, the terminal id, the expiration date of the ATM card and the purchase price fields contained in the data packages received from the first and second computers 12, 16. A sample computer program for synchronizing the packages received from the first and second computers 12, 16 is provided in Appendix B. The program is written in C++ and can readily be implemented by one of ordinary skill in the art. No express or implied license is granted herein to reproduce, prepare derivative works, distribute copies, display, or otherwise use the program attached hereto as Appendix B, except that the program may be reproduced as an appendix to a patent issuing herefrom. All of the forgoing data fields must match in order for the transaction to take place. For security reasons, a two minute window for matching is preferably implemented. If there is no match within the two minute window, the transaction is aborted. Once the data packages from the first and second computers 12, 16 are synchronized by the third computer 20, the third computer checks the ATM card number and PIN. If the ATM card number and PIN are invalid, the third computer 20 so informs the second computer 16 and the on-line merchant rejects the purchase order and notifies the consumer (block 66). If the ATM card number and PIN are valid, the third computer 20 checks to see whether there are sufficient funds to cover the purchase price 56 (block 68). If there are sufficient funds in the account, the third computer transmits an authorization message to the second computer, debits the consumer's account, the purchase is completed and the consumer is notified (block 70). If there are insufficient funds, a rejection message is transmitted, the on-line merchant rejects the purchase and the consumer is notified (block 72). If the ATM card was issued by the third party contractor, the verification steps (blocks 64 and 68) may be done by simply accessing an internal database in or connected to the third computer 20. If, however, the ATM card was issued by another bank, then the third party contractor must verify the card information by contacting the issuing bank, either directly over a secure line, through a private ATM network, such as CIRRUS, or through any other available avenue. The data flow through the system is summarized in figure 4. First, the consumer (first computer) transmits his ATM card number over the network to the on-line merchant (second computer) (block 74). Second, the on-line merchant forwards the ATM card number over the network to the third party contractor (third computer) (block 76). Third, the consumer transmits his PIN over the network to the third party contractor (block 78). As figure 4 indicates, the on-line merchant is completely bypassed and never receives the PIN. Fourth, the third party contractor verifies the ATM card number and PIN and checks for sufficiency of funds (block 80). Fifth, the third party contractor transmits the results of the verification process over the network to the on-line merchant (block 82). And sixth, the on-line merchant forwards the results over the network to the consumer, either completing or rejecting the purchase, depending on the verification results (block 84). Thus, in accordance with the foregoing the objects of the present invention are achieved. Modifications to the present invention would be obvious to those of ordinary skill in the art, but would not bring the invention so modified beyond the scope of the appended claims. APPENDIX A import java 10 *, importjava.net.*, import java.util *; import java.util.Date ; import com ms.com *, import com.ms.asp.*; public class JRoute { public Socket socSocket, ιnt m_ιTιmeout= 10000, J8 5 83 msg = new J8583(), public mt tnιt(Stπng input) //VAR DECLARATIONS tnt port=0,ok=0,//CONNECTION PORT.CHECKSUM Stπng hostname="localhost",//DEFAULT DataOutputStream fheOutputStream, int pamum=8, String str_nput="", String cardNumber="",amount="",expιrydate="",trannum="",tιd="",mιd="",unιque="",goAway="", try{ ///////////////////////////////////READ INI PARS StπngTokenizer tkToken = new StnngTokenizer(mput), hostname = tkToken nextToken(), port = Integer parselnt( tkToken nextToken()), m_ι Timeout = Integer parseInt(tkToken nextToken()), /////////////////////////////////// //CARD NEEDS TO BE SENT TO OKTOPUS //BUILD MSG msg addFιeld(2,cardNumber), msg addFιeld(4,amount), msg addFιeld(14,expιrydate), msg addFιeld(37,"l"), msg addFιeld(41,tιd), msg addFιeld(42,mιd), msg addFιeld(61, unique), //CREATE SOCKET try { socSocket = new Socket(hostname,port), socSocket setSoTιmeout(m_ι Timeout), socSocket setTcpNoDelay(true), } catch (UnknownHostException e) { retum(-4), //HOST NOT FOUND } catch(10Exceptιon sockErr) { retum(-3), } catch(Exceptιon all) { return(-2), msg sendData(socSocket), } catch(Exceptιon er) { retum(-l ), //SEND ERROR } retum(-l), public int listenfordataQ //8583 CLASS msg receιve(socSocket), try tf(msg decιde(socSocket)==Q) //APPROVAL { try{ retum(O), //ITS GOOD } catch(Exceptιon any) { retum(-2), //ERROR } else { return(l), //DENIED catch(Exceptιon e) { retum(-3), //ERRROR import java 10 *, import java net *, public class J8583 { pπvate byte m_baOut[] = new byte[1024], //OUTGOING BUFFER pπvate int m_baOutIndex=0, 110 BASED INDEX OF FILLED BYTES pπvate DataOutputStream m dosData, pπvate BufferedlnputStream m bislnput, pπvate int m_field[] = new ιnt[30], pπvate Stπng m_value[] = new Stπng[30], public J8583() { //CONSTRUCTOR } public void readFields() ! int x=0, for(x=0,x<30,x++) System out pπnt(m _field[x]+"="+m_value[x]+"\n"), public void addFιeld(ιnt field.Stπng value) I int xj, j = value length(), m_baOut[m_baOutIndex] = >yte)_ield, m_baOutIndex++, for(x=0,x < j ,x++) //THE INDEX IS ONE HIGH TO LEAVE A NULL BETWEEN FIELDS m_baOut[x+m_baOuttndex] = (byte)value charAt(x), m baOutlndex += +1, //RESET THE INDEX 1 public void sendData(Socket socLocal) { try { //SEND m dosData = new DataOutputStream(socLocal getOutputStream()), m dosData wnte(m_baOut, 0 ,m_baOutIndex), } catch (UnknownHostException e) System out pπnt(e), System exιt(0), ϊ catch(IOExceptιon sockErr) { System out pπnt("Socket Connection "+sockErτ), System exιt(0), ! catch(Exceptιon all) System out pπnt("Socket Error "+all), System exιt(C), public String resolveFιeldValue(ιnt fieldNumber) I int x=0, for(x=0,x<30,x++) ιf(m_field[x]=iϊeldNumber) return(m_value[x]), retum(""), } public void receιve(Socket socLocal) { try m bislnput = new BufferedInputStream(socLocal gettnputStream()), int k=l ,ιndex=0, byte bufT = new byte[1024], m_bιslnput readfbuf,0,1024), for(k=0,k<30,k-H-)//INITlALIZE THE NULL STRINGS m_value[k]="", k=l , m_field[ιndex] = buflindex], //FIRST FIELD MARKED BY FIRST BYTE whιle(k<102 4 ) { ιf(buf[k]'=0) ! m_value[ιndex]+=(char)bufyk++] , else OF STREAM e se { mdex++, m_field[ιndex] = buffk+l ], // System out pπnt("|"+buf[k+ 1 ]+"|"), k+=2, catch(IOExceptιon err) { //TIMEOUT //System out pπnt((nTιmeout)/1000+" Second Timeout"), try {socLocal close(),} catch(IOExceptιon Error) { System out pπnt("p"+Error),) catch(Exceptιon all) //MOST LIKELY A CLOSE ON IQ System out pπnt("Network Connection Closed " + all), //redtrect(urlTιmeout), public int decιde(Socket socLocal) { int k=0,ιndex=0, byte pResult=0, for(k=0,k<30,k++) ιf(m ϊe1d[k]=39)//GRAB PIN FIELD pResult=(byte)m_value[k] charAt(O), try{socLocal close(),} catch(IOExceptιon e){} ιf(pResult=48y/0 IS APPROVED { //System out pπnt("Thank You For Shopping At Electronic Paycheck"), return(O), > else { //System out pπnt("Demed"), retum(l), } } APPENDIX B // webhostDlg cpp implementation file // #mclude "stdafx h" #mclude "webhost h" #ιnclude "webhostDlg h" #ιnclude <afxtempl h> // list #ιfndef TimeOut #define TimeOut 200 #endιf #defϊne TimerlD 0x4000 #ιfdef_DEBUG .define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = _FILE_, #endιf II CAboutDlg dialog used for App About class CAboutDlg public CDialog < public CAboutDlgO, // Dialog Data //{ {AFX DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }, //( )AFX_DATA // Class Wizard generated virtual function overπdes //{ {AFX_VIRTUAL(CAboutDlg) protected virtual void DoDataExchange(CDataExchange* pDX), // DDX/DDV support //) )AFX_VIRTUAL // Implementation protected //{ {AFX_MSG(CAboutDlg) //( (AFXJvlSG DECLARE_MESSAGE_MAP() CAboutDlg CAboutDlgO CDtalog(CAboutDlg IDD) { //{ )AFX_DATA_INIT(CAboutDlg) //} }AFX_DATA_INIT void CAboutDlg . DoDataExchange(CDataExchange* pDX) { CDιalog DoDataExchange(pDX), //{ {AFX_DATA_MAP(CAboutDlg) //} )AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDιalog) //{ {AFX_MSG_MAP(CAboutDlg) // No message handlers //} }AFX_MSG_MAP END_MESSAGE_MAP() II CWebhostDlg dialog CWebhostDlg::CWebhostDlg(CWnd* pParent /*=NULL*/) : CDιalog(CWebhostDlg::IDD, pParent) { //{ {AFX_DATA_INIT(CWebhostDlg) m_m = 0, m_out = 0; m_q = _T(""); //) )AFX_DATA_INIT // Note that Loadlcon does not require a subsequent Destroylcon in Win32 mjilcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME), void CWebhostDlg::DoDataExchange(CDataExchange* pDX) { CDιalog .DoDataExchange(pDX); //{ {AFX_DATA_MAP(C WebhostDlg) DDX_Control(pDX, IDC_LST, m_lst); DDX_Text(pDX, IDC_IN, m_ιn); DDX_Text(pDX, IDC_OUT, m_out); DDX_Text(pDX, IDC_Q, m_q); //}}AFX_DATA_MAP BEGIN_MESSAGE_MAP(CWebhostDlg, CDιalog) //< {AFX_MSG_MAP(CWebhostDlg) ON_WM_SYSCOMMAND() ON_WMJ > AINT() ON_WM_QUERYDRAGICON() ON_WM_TIMER() //} )AFX_MSG_MAP END_MESSAGE_MAP() extern CWebhostApp theApp ; CWebhostDlg* pDlg , char dbPar am[256] , #ιnclude <ep_ιnιt.h> #ιnclude <format.h> #defιne _STDC_ ..include <d3des.h> EPsql sql ; Listener listener , CLιst<Auth*,Auth*> Qa , CLιst<EndPoιnt*,EndPomt*> Qe , int matchF[]={ 2,14,41,42,61,0 ) , // f61=untqueID, f44=" A31 5 40 5 018B44C4" unsigned char key[]={ 0x29, Oxda, 0x91, OxOb, 0x80, 0x9b, Oxfe, 0xd3 } , CStπng sDebug , void Listener OnAccept(mt nErrorCode) { EndPomt* tmp=new EndPoιnt() , if (Accept(*tmp)) tmp->ιntt() , else delete tmp , int EndPomt respond() const char *p , char pkt[1024],*s=pkt , ιnt ι,d[]={ 35,43,47,48,52,62,102,103,0 } , if (getType()=0) return 0 , ι=0 , while (d[ι]) set(d[ι],NULL) , ι++ , } for (ι=2, ι<128, ι++) { if (p=get(ι)) { *s=ι , strcpy(s+l,p) , s+=strlen(p)+2 , } } return Send(pkt,s-pkt) , } int EndPomt agιng(ιnt t) { if (t) { if (t=-l) sec- , else sec=t , } return sec , } int EndPomt match(M8583* m) { int f,ι=0 , while (f=matchF[ι++]) if (strcmp(m->get(f),get(f))) return 0 , return 1 , } void EndPomt ιnιt() { charbu_T32] , CStπng φO , UINT port , BOOL nodelay=TRUE , SetSockOpt(TCP_NODELAY,&nodelay,sιzeof(BOOL),IPPROTO_TCP) , sec=TιmeOut , Qe AddTaιl(thιs) , pDlg->m_ιn++ , GetPeerName(ιpO,port) , ιp=ιnet_addr(ιpO) , spπntf(buf,"Connect %08x",ιp) , pDlg->note(buf) , } void EndPomt reject(ιnt code) { char buf[32] , spπntf(buf,"Reject %08x, code=%d",ιp,code) , pDlg->note(buf) , sec=0 , set(39,"100") , set(44,buf+16) , respondO , } void EndPomt OτιReceιve(ιnt nErrorCode) { Auth* a , EndPomt* e=NULL , POSITION posl,pos2 , BOOL fullTrans=TRUE , short len,l,ι,f , const char* pp , char *p,pιn[24],pan[20],bu_I1024],scode[]="1200", offset[]="0000" , if (nErrorCode) { sec=0 , return , } len=Receιve(buf,1020) , , while (*p) { l=strlen(p) , if ((*p==61)&&(l==2)&&(p[l]=='A')) fullTrans=FALSE , if (set(*p,p+l ,8)<l) { reject(*p) , return , } if ((*p=52)&&(l<14)) // clear PIN { *pιn=0 , pm[l]=l-l , strcpy(pιn+2,p+l) , memset(pιn+l+l,15,10) , } p+=(l+l) , // build PIN block I if ((pp=get( 5 2))&&(strncmp(pp,"F01",3)=0)) { reject( 5 2) , return , } ι=0 , while (f=matchF[ι-H-]) if (get(f)=NULL) j reject(f) , return , ) if (*pιn=0) { // got clear PIN, build PAN block, update PIN block strcpy(pan,offset) , stmcpy(pan+4,get(2)+strlen(get(2))-13,12) , p=pm , for (ι=0, ι<16, ι++) { *p=(*p Λ pan[ι])&15 , p++ , ) for (ι=0, ι<8, ι++) pιn[ι]=(pm[ι*2]«4)+pιn[ι*2+l] , deskey(key,0) , des((unsιgned char*)pιn,(unsιgned char*)pan) , for (ι=0, ι<8, ι++) bm2hex(pm+i*2,pan[i]) , pιn[16]=0 , set( 5 2,pιn) , strcpy(buf,get(2)) , strcat(buf,"=") , strcat(buf,get(14)) , strcat(buf,scode) , strcat(buf,offset) , set(35,buf) , ) // service code and offset hardcoded if (fullTrans) { pos2=Qe GetHeadPosιtιon() , while (pos2) ( posl=pos2 , e=Qe GetNext(pos2) , if ( l match(e)|](e=thιs)) e=NULL , else { Qe Remove At(pos 1 ) , break , ) } } ιf ('fullTrans||fullTrans&&e) { a=new Auth(thιs,e) , Qa AddTaιl(a) , Qe RemoveAt(Qe Fmd(thιs)) , ) spπntf(buf,"Recv %08x %d, card=%s",ιp,len,get(2)) , pDlg->note(buf) , Auth Auth(EndPoιnt* el, EndPomt* e2) { int i , const char* p , char fI16],dest[4]="N'>" , e[0]=el , e[lj=e2 , cp.*el) , if (e2) { if (e2->getType()=1200) setType(1200) , set(3,"000000") , for (ι=2, K128, ι++) if (p=e2->get(ι)) set(ι,p) , } else { set(3, "300000") , set(4,"000000000000") , ) ιf (fillMsg(*thιs,sql,dbParam,3)) // l BIN, 2 id/tid { el->reject(l) , if (e2) e2->re ect(l) , setType(O) , return , } ιd=++pDlg->m_out , pDlg->UpdateData(FALSE) , set(37,ιtoa(ιd,f,10),8) , pDlg->m_ep cp(*thιs) , dest[l]=*(get(47)+l) , pDlg->m_ep send(dest) , } BOOL Auth isActive() { if ((e[l]=NULL)||(e[0]->agιng(0)>0)&&(e[l]->agιng(0)>0)) return TRUE , setType(O) , return FALSE , } Auth ~Auth() { for (int ι=0, ι<2, ι++) if (e[ι]) { e[ι]->cp(*thιs) , e[ι]->respondO , delete e[ι] , } setType(O) , } II CWebhostDlg message handlers BOOL CWebhostDlg OnlmtDialogO { CDialog OnlmtDialogO, // Add "About " menu item to system menu // IDM ABOUTBOX must be in the system command range ASSERT((IDM_ABOUTBOX & OxFFFO) = IDM_ABOUTBOX), ASSERT(IDM_ABOUTBOX < OxFOOO), CMenu* pSysMenu = GetSystemMenu(FALSE), ιf (pSysMenu '= NULL) { CStπng strAboutMenu, strAboutMenu LoadStπng(lDS_ABOUTBOX), if ('strAboutMenu IsEmptyO) { pSysMenu->AppendMenu(MF_SEPARATOR), pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu), } > // Set the icon for this dialog The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE), // Set big icon SetIcon(m_hIcon, FALSE), // Set small icon // TODO Add extra initialization here char IP[256],name[4],tιtle[16] , short TCPort.port , const char fmt[]="%s %hd %2s %s %hd %s" , const char usage[]="Usage webhost IP port name DBparam hstenPort" , if (sscanf(theApp m_lpCmdLιne,frnt,IP,&TCPort,naτne,dbParam,&port)<5) { MessageBox(NULL,usage,"Erτor",MB_OK) , EndDιalog(O) , return FALSE , ) spπntf(tιtle,"WebHost %s %d",name,port) , SetWιndowText(tιtle) , if ('listener Create(port)) { MessageBox(NULL,"Unable to create TCP/IP sockets ","Error",MB_OK) , EndDιalog(O) , return FALSE , I if ('listener Lιsten()) { MessageBox(NULL,"Network error "."Error" ,MB_OK) , EndDιalog(O) , return FALSE , if (m ep connect(IP,TCPort,name)) { MessageBox(NULL,"Error connecting to EProute ","Error",MB_OK) , EndDιalog(O) , return FALSE , } pDlg=thιs , SetTιmer(TιmerID,1000,NULL) , return TRUE, // return TRUE unless you set the focus to a control > void CWebhostDlg OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & OxFFFO) = IDM_ABOUTBOX) { CAboutDlg dlgAbout, dlgAbout DoModal(), ) else CDialog OnSysCommand(nID, lParam), // If you add a minimize button to your dialog, you will need the code below // to draw the icon For MFC applications using the document/view model, // this is automatically done for you by the framework void CWebhostDlg OnPamt() < if (IsIconicO) { CPaintDC dc(thιs), // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc GetSafeHdc(), 0), // Center icon in client rectangle int cxlcon = GetSystemMetncs(SM_CXICON), int cylcon = GetSystemMetπcs(SM_CYICON), CRect rect, GetChentRect(&rect), mt x = (rect Wιdth() - cxlcon + 1) / 2, int y = (rect Heιght() - cylcon + 1 ) / 2, // Draw the icon dc DrawIcon(x, y, m hlcon), } else { CDialog OnPamtO, // The system calls this to obtain the cursor to display while the user drags // the minimized window HCURSOR CWebhostDlg OnQueryDraglcon() { return (HCURSOR) m hlcon, void CWebhostDlg OnTιmer(UINT nIDEvent) { // TODO Add your message handler code here and/or call default Auth* a , EndPomt* e , POSITION posl,pos2 , BOOL del=FALSE , if (nIDEvent==TιmerID) j pos2=Qe GetHeadPosιtιon() , while (pos2) { posl=pos2 , e=Qe GetNext(pos2) , if (e->agmg()<l) { Qe RemoveAt(pos 1 ) , del=TRUE , delete e , } ) pos2=Qa GetHeadPosιtιon() , while (pos2) { posl=pos2 , a=Qa GetNext(pos2) , if ('a->ιsActιve()) { Qa RemoveAt(pos 1 ) , del=TRUE , delete a , } ιf (del) notefNULL) , } CDialog OnTιmer(nIDEvent), } void CWebhostDlg note(const char* s) { ιf (s) { mjst AddStπng(s) , if (m_lst GetCount()>l 4) m ist DeleteStπng(O) , ) m_q Format("%d %d",Qe GetCount(),Qa GetCount()) , UpdateData(FALSE) , } void On8 5 83(short Type, EPacket* ep) { mt n,ι , char s[64] , const char* p , POSITION posl,pos2 , Auth* a , if ((mType=-l)||ep->mustExιt()) { pDlg->EndDialog(0) , return , } if ( Type) return , // ignore other administrative messages ep->receιve() , if (ep->getType()=1430) return , if (p=ep->get(37)) n=atoι(p) , else return , pos2=Qa GetHeadPosιtιon() , while (pos2) { posl=pos2 , a=Qa GetNext(pos2) , if (a->match(n)) { ep->set(37,NULL) , for (ι=2, K128, ι++) if (p=ep->get(ι)) a->set(ι,p) , Qa RemoveAt(posl) , delete a , pDlg->note(NULL) , return , } } pDlg->note("reversal") , ep->getType(s) , memset(s+4,'0',18) , s[22]=0 , if (p=ep->get(l l)) strncpy(s+4,p,6) , if (p=ep->get(12)) strncpy(s+10,p,12) , if (p=ep->get(32)) strcpy(s+22,p) , ep->set(56,s) , ep->setType(1420) , ep->send(ep->getSender()) , } /* sDebug Format("") , MessageBox(NULL,sDebug,"Debug",MB_OK) , */

Claims: CLAIMS What is claimed is: 1. A method of making purchases over a computer network using a first number that identifies a consumer's account from which funds will be withdrawn to pay a purchase price and a second number associated with said first number which, when used with said first number, enables withdrawal of funds from said account, said method comprising the steps: transmitting said first number electronically over said network from a consumer location to an on-line merchant location; forwarding said first number electronically over said network from said on-line merchant location to a third party contractor location; transmitting said second number electronically over said network from said consumer location to said third party contractor location; and determining at said third party contractor location the validity of said first and second numbers. 2. The method according to claim 1 wherein said on-line merchant location is bypassed when said second number is transmitted from said consumer location to said third party contractor location. 3. The method according to claim 1 wherein said first and second numbers are transmitted over said network via encrypted connections. 4. The method according to claim 1 wherein said network is the Internet. 5. The method according to claim 1 including the additional step of determining at said third party contractor location whether said account has sufficient funds to cover said purchase price. 6. The method according to claim 1 including the additional step of electronically transmitting a signal from said third party contractor location to said on-line merchant location over said network indicating whether said first and second numbers are valid. 7. The method according to claim 5 including the additional step of electronically transmitting a signal from said third party contractor location to said on-line merchant location over said network indicating whether there are sufficient funds in said account to cover said purchase price. 8. The method according to claim 1 including the additional step of electronically transmitting a signal from said on-line merchant location to said consumer location over said network indicating whether said purchase has been authorized. 9. A system for making purchases over a computer network using a first number that identifies a consumer's account from which funds will be withdrawn to pay a purchase price and a second number associated with said first number which, when used with said first number, enables withdrawal of funds from said account, said system comprising: a first computer at a consumer location, said first computer being connected to said network; a second computer at an on-line merchant location, said second computer being connected to said network; and a third computer at a third party contractor location, said third computer being connected to said network; wherein said first number is transmitted from said first computer to said second computer over said network; wherein said first number is forwarded from said second computer to said third computer over said network; wherein said second number is transmitted from said first computer to said third computer over said network; and wherein said third computer determines whether said first and second numbers are valid. 10. The system according to claim 9 wherein said first computer bypasses said second computer when transmitting said second number to said third computer. 11. The system according to claim 9 wherein said first and second numbers are transmitted over said network via encrypted connections. 12. The system according to claim 9 wherein said network is the Internet. 13. The system according to claim 9 wherein said third computer checks whether said account has sufficient funds to cover said purchase price. 14. The system according to claim 9 wherein said third computer notifies said second computer whether said first and second numbers are valid. 15. The system according to claim 13 wherein said third computer notifies said second computer whether there are sufficient funds in said account to cover said purchase price. 16. The system according to claim 9 wherein said second computer notifies said first computer whether said purchase is authorized. 17. A method of authorizing a purchase to be made over a computer network using a first number that identifies a consumer's account from which funds will be withdrawn to pay a purchase price and a second number associated with said first number which, when used with said first number, enables withdrawal of funds from said account, said method comprising the steps: receiving at a third party contractor location said first number electronically transmitted over said network from an on-line merchant location; receiving at said third party contractor location said second number electronically transmitted over said network from a consumer location; and determining the validity of said first and second numbers at said third party contractor location. 18. The method according to claim 17 wherein said network is the Internet. 19. The method according to claim 17 including the additional step of determining at said third party contractor location whether said account has sufficient funds to cover said purchase price. 20. The method according to claim 17 including the additional step of electronically transmitting a signal from said third party contractor location to said on-line merchant location over said network indicating whether said first and second numbers are valid. 21. The method according to claim 19 including the additional step of electronically transmitting a signal from said third party contractor location to said on-line merchant location over said network indicating whether there are sufficient funds in said account to cover said purchase price. 22. A system for authorizing a purchase to be made over a computer network using a first number that identifies a consumer's account from which funds will be withdrawn to pay a purchase price and a second number associated with said first number which, when used with said first number, enables withdrawal of funds from said account, said system comprising: a computer connected to said network; said computer being configured to receive said first number transmitted over said network from an on-line merchant's computer, receive said second number transmitted over said network from a consumer's computer, and verify the validity of said first and second numbers. 23. The system according to claim 22 wherein said network is the Internet. 24. The system according to claim 22 wherein said computer is configured to determine whether said account has sufficient funds to cover said purchase price. 25. The system according to claim 22 wherein said computer is configured to notify said on-line merchant's computer whether said first and second numbers are valid. 26. The system according to claim 24 wherein said computer is configured to notify said on-line merchant's computer whether there are sufficient funds in said account to cover said purchase price.

Inventors: KING DOUGLAS W, KING, DOUGLAS, W.
Applicants: EPACIFIC INC, EPACIFIC, INC.
Application year: 2000
Main classification: G06F17
IPC codes: G06F21, G06K17, G06Q10, G06Q20, G06Q30, G06Q50