Chapter 4. Integration with SET
4.4 Installing the SET cassette
4.4.4 Sample Checkout
The sample checkout is supplied with the SET cassette. Configuration of the SampleCheckout.xml is required before you can successfully use the tool. To do this:
1. Change to the directory
<payment_Manager_Install_directory>/Samples/SampleCheckout/.
Note: If you kept to the supplied defaults when installing Payment Manager,
the directory is <drive>:\Program
Files\IBM\PaymentManager\samples\SampleCheckout. 2. Edit the file SampleCheckout.xml
a. Add the MIA and SET (with wallet) options to the XML file.
Add two additional payment option ids to the PaymentOptionList as follows:
<PaymentOptionList>
<PaymentOption id="SET" profile="SampleCheckoutSET">SET </PaymentOption> <PaymentOption id="SETWallet"
profile="SampleCheckoutSETWallet">SETWallet</PaymentOption>
Note: The text for each option ID should be on a single line.
b. Configure merchant information
SampleCheckout acts as a application that creates orders for specific Payment Manager merchants. Since it mimics the merchant, Payment Manager details on the merchant are required. It uses these details to pass on to Payment Manager when creating the order. The supplied XML file assumes a user ID of admin with a password of admin.
This is the default Payment Manager setup when using the supplied Payment Manager realm. If you have changed Payment Manager to use another realm, make sure that the realm has this specific user ID and password or alternatively change the user ID and password values in the XML file to reflect users that will be able to log on to Payment Manager as an administrators. In our test environment the user ID and password values were changed to wcsadmin.
merchantNumber="123456789"
Change this value to the merchant number associated with the merchant specified in the userid= field. This number can be found in the Payment Manager merchant settings option.
cashierProfileDirectory= and cashierTraceDirectory= are both specified with the values for the default directories. If you changed these values when you installed Payment Manager, edit these values to the correct settings.
The resulting XML file should look similar to Example 4-2.
Note: The comments at the beginning of the file have been removed for
clarity.
Example 4-2 Configured SampleCheckout.xml file <SampleCheckout merchantNumber="10001" pmHostname="localhost" pmPort="80" userid="wcsadmin" password="wcsadmin" useSSL="0" cashierProfileDirectory="C:/Program Files/IBM/PaymentManager/profiles" cashierTraceDirectory="C:/Program Files/IBM/PaymentManager/log"> <!-- ============================================================================ PaymentOptionList specifies which payment options are available in SampleCheckout.
Each payment option idenfies a profile to be used when creating Payment Manager
orders with that payment option. The value of the PaymentOption will be displayed as the descriptive text of that payment option. You can use plain text
or an image escaped with <![CDATA[...]]> tags.
============================================================================ -->
<PaymentOptionList>
<PaymentOption id="SET" profile="SampleCheckoutSET">{SET} </PaymentOption>
<PaymentOption id="SETWallet" profile="SampleCheckoutSETWallet">{SETWallet} </PaymentOption>
<PaymentOption id="Offline" profile="SampleCheckoutOfflineCard" default="1">{OFFLINECARD} </PaymentOption> <PaymentOption id="COD" profile="SampleCheckoutCustomOfflineCOD">{CASHONDELIVERY} </PaymentOption> <PaymentOption id="BillMe"
</PaymentOption> </PaymentOptionList>
c. Save the configured SampleCheckout.xml file.
3. To use the Sample Checkout point a browser at the following URL: http://localhost/SampleCheckout
The result is shown in Figure 4-19.
Figure 4-19 Sample Checkout
1. Select the SETWallet radio button to simulate the FULL SET architecture. 2. The brand, credit card number, expiration date should then be removed from
the window. The reason for this is that the wallet software will be triggered into action and the choice of credit card brand and so on will be made by the consumer through the wallet software.
3. Enter an order number that has not previously been processed by Payment Manager.
4. Enter the amount and the chosen currency as shown in Figure 4-20.
5. Click Buy. The Sample Checkout formulates an order and passes the information on to Payment Manager. If any errors occur at this stage (for example the order already exists for this merchant) then they are passed back to the SampleCheckout GUI interface. If the order is created successfully, the SET Consumer Wallet software is triggered. If you are not already logged on, then sign on to the consumer wallet software.
6. Once successfully logged on to the Consumer Wallet you will be presented with a window showing the details of your purchase including the amount being requested, the order number and a description of the order. You now have the choice of cancelling the order or paying with the SET card. 7. Click Pay to continue with the purchase as shown in Figure 4-21.
Tip: Out of the box the Sample Checkout supports only two currencies, US
and Canadian Dollars, even though you are able to select other currencies using the GUI interface. If the currency is not defined in the properties file for SET (for the language you are using) the SETWallet request will fail. if you want to test your SET environment using other currencies add the required currency code to the file SampleCheckoutSET_en.properties file. A list of valid currencies can be found in the file
SampleCheckout.properties file. To get the above example working with the Euro currency, the currency code “CURCODE.978=Euro” was added to the SampleCheckoutSET_en.properties file.
Figure 4-21 SET wallet pay prompt
8. An information box appears to say that the wallet is sending a payment initiation request. If this is successful, then a merchant verification window appears that enables the consumer to verify the credentials of the merchant. This is the information created by the merchant when requesting the
merchant SET certificate. Figure 4-22 shows an example.
9. Another dialog takes place with the Payment Manager and the order is successfully placed. A message detailing that the order was successfully placed is written to the SampleCheckout window, as shown in Figure 4-23.
Figure 4-23 Successful Sample Checkout order
Note that the consumer has not been required to enter any credit card number or expiration date and has also been able to verify the credentials of the merchant. If you log on directly to Payment Manager as the wcsadmin merchant, you can see the order in the list of orders ready for the merchant to process. If you open this order (by clicking the order number) you will see that the merchant does not see the credit card details. They are kept in the Payment Manager database fully encrypted (128-bit encryption is used to save the details).
Figure 4-24 shows an example of an order created using SET.