This deals with all server callback including Merchant Initialisation, Exchange Rate updates, and payment authorisation responses.
You must first create the
COMcallback object using the Server.CreateObject("Web-Merchant/WM.COMcallback")
method. Next you must call the 'processCallback' method and check for errors
using the 'hadError'/'hasMoreError'/'getNextError' methods.
Next it must be determined whether or not the transaction was successful by callind 'didTransSuc()'. This will return true if the transaction was successful and output the appropiate page to the user. i.e. if true then output the success page else output the failed page. If images are to be used, these must be uploaded to the Web-Merchant/WM Server. See the Select Integerators documentation for more information.
To get the transaction ID, shopper ID, or cart ID, you must call the 'getTransId', 'getShopperId', and 'getCartId' methods. These are the fields sent with the purchase token.
Methods:
| Method: | processCallback() |
| Description: | Call this function to process a callback. You must call this function before calling get method. If an error is encountered during processing then the errors can be examined using the getFirstError and getNextError methods. After calling this method, call isAuth to find out if the callback is a payment authorisation. If it is then call didTransSuc to find out whether the transaction was successful and output the appropiate message. |
| Returns: | |
| Parameters: | none |
| Method: | String getCartId() |
| Description: | Gets the cart ID. You must call 'processCallback' first. |
| Returns: | The cart ID as astring. |
| Parameters: | none |
| Method: | String getShopperId() |
| Description: | Gets the shopper ID. You must call 'processCallback' first. |
| Returns: | The shopper ID as astring. |
| Parameters: | none |
| Method: | boolean didTransSuc() |
| Description: | Called after 'isAuth' the check the status of the transaction. You must call 'processCallback' first. |
| Returns: | True if the transaction is successful, false otherwise. |
| Parameters: | none |
| Method: | String getTransID |
| Description: | Gets the Web-Merchant/WM ID for this transaction. You must call 'processCallback' first. |
| Returns: | The Web-Merchant/WM ID as a string. |
| Parameters: | none |