|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--webpay.client.Webpay
This object provides methods to perform transactions with the Webpay gateway array, or a specified gateway array. Transactions are implemented securely using SSL and a supplied digital certificate.
Constructor Summary | |
Webpay(java.lang.String clientID,
java.lang.String certificatePath,
java.lang.String certificatePassphrase)
Constructor for the Webpay object. |
|
Webpay(java.lang.String clientID,
java.lang.String certificatePath,
java.lang.String storeFormat,
java.lang.String certificatePassphrase)
|
Method Summary | |
void |
completeTransaction()
This method is used to complete a transaction request that is currently in progress and has been initialised using the initTransaction method. |
void |
execute()
This method has the same effect as calls to initTransaction() and completeTransaction. |
java.lang.String |
get(java.lang.String name)
Returns a value from the response bundle. |
webpay.net.TransactionBundle |
getBundle()
Returns the TransactionBundle from the Webpay client object |
java.lang.String[] |
getResponseNames()
Returns a String array of the names for values in the response bundle. |
java.lang.String |
initTransaction()
Initialises a transaction against the Webpay Transaction Servers. |
void |
put(java.lang.String name,
java.lang.String value)
Put a value the internal data bundle for transmission. |
void |
setDebugLevel(int level)
Sets tho amount of logging to enable within the webpay object. |
void |
setPort(int port)
Sets and overrides the default Webpay server port. |
void |
setPort(java.lang.String port)
Sets and overrides the default Webpay server port. |
void |
setServers(java.lang.String[] servers)
Sets and overrides the default Webpay server array. |
java.lang.String |
toString()
Outputs the Transaction Bundle in the form of value pairs separated by a newline (crlf). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Webpay(java.lang.String clientID, java.lang.String certificatePath, java.lang.String certificatePassphrase) throws java.lang.Exception
clientID
- The client identification number.certificatePath
- The location on disk of the clients digital certificate.certificatePassphrase
- The passphrase for the digital certificate.java.lang.Exception
- Throws an Exception if the object could not be set up correctly.public Webpay(java.lang.String clientID, java.lang.String certificatePath, java.lang.String storeFormat, java.lang.String certificatePassphrase) throws java.lang.Exception
Method Detail |
public void execute() throws java.io.IOException java.net.ConnectException
| | 1 | ------------------> | | | 2 | <------------------ | | | 3 | ------------------> | | | 4 | <------------------ | | |1. Send FULL request. 2. Recieve Transaction Reference. 3. Send Transaction Reference back to server. 4. Receive FULL response. If you do not receive a response(4) then you can do a status transaction against the server, to get the transaction status.
java.io.IOException
- if a communications error occursjava.net.ConnectException
- if a connection exception occurs
public java.lang.String initTransaction() throws java.io.IOException java.net.ConnectException
java.io.IOException
- when a communications error occurs with the engine. It is safe to assume that
the transaction has not been processed.java.io.ConnectException
- when a communications error occurs with the engine. It is safe to assume that
the transaction has not been processed.public void completeTransaction() throws java.io.IOException
java.io.IOException
- on a communications errorpublic java.lang.String toString()
toString
in class java.lang.Object
public webpay.net.TransactionBundle getBundle()
public void put(java.lang.String name, java.lang.String value)
get()
.name
- The name of the value to be setvalue
- The transaction value to be set e.g. Credit card numberpublic java.lang.String get(java.lang.String name)
name
- The name of the value to be extracted from the response bundlenull
if the value has not
been setpublic java.lang.String[] getResponseNames()
public void setServers(java.lang.String[] servers)
servers
- A String array of domain names and/ or IP addresses.public void setPort(java.lang.String port)
port
- port - the TCP port number to connect topublic void setPort(int port)
port
- the IP port number of the webpay servers to connect to.public void setDebugLevel(int level)
level
- int specifiying the amount of debugging. 0 = off, 1 = lowest, 3 = highest.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |