If you are using Select Pro then there is a Java constant for each parameter name that you can use from your Java code. The names of these constants are of the form "SEL_<parameter name>". By using these you can be sure the strings used will match those expected by the Web-Merchant/WM Select server. These constants are defined in the class "com.WM.select.SelectDefs".
For Select COM these parameters
are accessed via get and set methods on the COMpurchase object. Please note
that not all the parameters listed below are available. See the Select COM documentation
for details.
Initiating a Purchase Transaction
Certain parameters must be supplied
by the merchant to initiate a purchase, others are optional. Where a length in
characters is given, this is the maximum length that the Select database can store.
Anything longer will be truncated. For Select Pro users some parameters are encapsulated
in the encrypted and signed purchase token, as indicated in the table. See Select
Pro documentation for further details.
| Parameter Name | Type | Obligatory? | In purchase token? | Description |
|---|---|---|---|---|
| instId | integer | Yes | Yes | The Web-Merchant/WM ID for this installation |
| resultFile | string | - | - | The name of one of your uploaded files, which will be used to format the result. See Configuring your Installation. If this is not specified, resultY.html or resultC.html are used as described in Payment Response. |
| cartId | 255 char | Yes | Yes | A parameter for your own reference number for this purchase. It is returned to you along with the authorisation results by whatever method you have chosen for being informed (email and / or server call-back). |
| desc | 255 char | - | - | A textual description of this purchase (up to 255 characters). This is used in web-pages, statements and emails for yourself and the shopper. |
| amount | Decimal | Yes | Yes | A decimal number giving the cost of the purchase in terms of the major currency unit e.g. 12.56 would mean 12 pounds and 56 pence if the currency were GBP (Pounds Sterling). |
| currency | 3 char | Yes | Yes | 3 letter ISO code for the currency of this payment - see appendix for list of currency codes. For a multi-item purchase all items will be converted to this currency before the total is calculated. (multi-item purchase not available until late '99) |
| accId<n> | integer | - | Yes | Specifies one or more merchant accounts as candidates for receiving funds for this payment. The Web-Merchant/WM server tries accId1, then accId2 etc. until one is found that is able to take the payment (this is based on testMode and currencies available). There is no need to specify accounts, but this is useful if you have multiple live accounts for different purposes. |
| authMode | char | - | Yes | Specifies the authorisation mode to use. This is only needed if you have accounts with different authorisation modes, in order to specify which type of account to use. If there is no account with a matching authMode then the transaction is rejected. The values are "A" for a full auth, or "E" for a pre-auth. In the response, this parameter can also take the value "O" when performing a post-auth (on the admin server or otherwise). |
| testMode | integer | - | Yes | An integer specifying that this is a test payment. For normal testing you set this to "100", which always results in a successful authorisation for the payment, or "101", which always fails, regardless of card details. The bank is not involved. Set this parameter to "0" or omit it for a live transaction. See Testing your Installation for further details. |
| authValidFrom | integer | - | Yes | Specifies a time window within which the purchase must (or must not) be completed, eg. if the purchase is a time-limited special offer. Each of these parameters is a time in milliseconds since 1 January 1970 GMT - a Java long date value (as from System.currentTimeMillis() or Date.getTime()), or 1000* a C time_t. If from<to, then the authorisation must complete between those two times. If to<from, then the authorisation must complete either before the to time or after the from time. Either may be zero or omitted to give the effect of a simple "not before" or "not after" constraint. If both are zero or omitted, there are no restrictions on how long a customer can spend making their purchase (although the Web-Merchant/WM server will time-out their session if it is idle for too long). |
| authValidTo | integer | - | Yes | |
| name | 40 char | - | - | The shopper's full name, including any title, personal name and family name |
| address | 255 char | - | - | The shopper's address. Encode newlines as " " (the HTML entity for ASCII 10, the new line character) |
| postcode | 12 char | - | - | Shopper's postcode |
| country | 2 char | - | - | Shopper's country, as 2 character ISO code, uppercase. See appendix for a list of these codes. |
| tel | 30 char | - | - | Shopper's telephone number |
| fax | 30 char | - | - | Shopper's fax number |
| 80 char | - | - | Shopper's email address |
| Parameter Name | Type | Description |
|---|---|---|
| amountString | Variable length char string | An HTML string produced from the amount and currency that were submitted to initiate this purchase |
| countryString | Variable length char string | The full name of the country, derived from the country code submitted to initiate this purchase or supplied by the shopper |
| compName | Variable length char string | Name of the company associated with this installation |
In addition the following are also available:
| Parameter Name | Type | Description |
|---|---|---|
| transId | integer - 16 digits | The Web-Merchant/WM ID for this transaction |
| transStatus | 1 char | Result of this transaction - "Y" for a successful payment authorisation, "C" for a cancelled payment (note that as a merchant you will never see a declined payment as the customer is always given the option of retrying with another means of payment, or else cancelling the payment). |
| transTime | long integer | Time of this transaction in milliseconds since the start of 1970 GMT. This is the standard system date in Java, and is also 1000x the standard C time_t time. |
| rawAuthMessage | string | Text received from the bank (typically including an authorisation code, or a reason for failure). |
$Revision: 1.19 $