Cassette for VisaNet Cashier profiles
The WebSphere Commerce Payments Cashier can be invoked by client applications (such as merchant software) to simplify the process of creating WebSphere Commerce Payments orders and payments. The Cashier uses XML documents called profiles that describe how orders should be created for a given cassette. This allows the client code developer to concentrate on integrating with the WebSphere Commerce Payments in a generic way rather than having to write code that deals with cassette-specific information.
It is still possible to create WebSphere Commerce Payments orders without using the Cashier; programs can use the client access library or the HTTP/XML interface to use the API commands (for example, AcceptPayment). However, the use of the Cashier is preferred since it allows the potential for new cassettes to be introduced to the system without the need for rewriting any code.
A Cashier profile represents a description of how WebSphere Commerce Payments orders should be created for a particular payment method. Profiles are XML documents that contain all the information needed by the Cashier to create WebSphere Commerce Payments API requests to create orders for a cassette supporting that payment method. All profiles must include the following data:
- An indication of whether a wallet is used (this flag will be used to determine whether the Cashier should use the AcceptPayment or ReceivePayment command)
- Required WebSphere Commerce Payments parameters
- Required cassette parameters
- Specifications for how the Cashier should supply values for each of the preceding parameters
In addition, profiles may also contain the following optional data:
- An indication of which WebSphere Commerce Payments instance to use for each profile
- Optional WebSphere Commerce Payments parameters
- Optional cassette parameters
- Buy page information that specifies how client code should build buy pages to collect buyer information. For example, the buy page information might contain an HTML form that collects credit card information required by a specific cassette
- An indication of whether diagnostic information is to be enabled for the profile
Cashier profiles allow parameter values to be specified in four different ways:
- Hard-coded as constants in the profile
- Passed as an environment variable on the CollectPayment() call
- Specified as originating from a relational database field
- Specified as being calculated by Cashier extension code
The following Cashier profiles are provided with WebSphere Commerce for the Cassette for VisaNet:
-
WC51_VisaNet.profile
andWC51_VisaNet_PCard.profile
These profiles can be used with the WebSphere Commerce sample stores, or in a production environment. If you do not intend to process purchasing card data, use the
WC51_VisaNet.profile
. TheWC51_VisaNet_PCard.profile
contains additional fields needed to process purchasing card data. If you used the default instance name of demo, the profiles are stored in the following directory: WC_eardir/xml/payment. -
SampleCheckoutVisaNet.profile
This profile can be used for test or simulation purposes. The Sample Checkout application can be used to simulate the creation of orders that require payment processing. If you use the Sample Checkout application for test purposes, be aware that it requires that the Cassette for VisaNet profile be named
SampleCheckoutVisaNet.profile
.Initially, the
Note: Do not change the profile in theSampleCheckoutVisaNet.profile
is installed in directory pathPayments_installdir/cassettes/VisaNet/SampleCheckout/profiles
. When the cassette is added to an instance, the file is copied toPayments_installdir/wc.mpf.ear/SampleCheckout.war/profiles
. If you want to change the profile for an instance, you must change the profile located in the following directory:WAS_installdir/installedApps/node_name/ payments_instance_Commerce_Payments_App.ear/SampleCheckout.war/profiles
.Payments_installdir/wc.mpf.ear/SampleCheckout.war/profiles
directory for a given instance. Changes made to the profile in this location will affect all Payments instances.
All of these Cashier profiles use full AVS information.
If necessary, you can edit the profile to set certain parameters, such as APPROVEFLAG and DEPOSITFLAG. (These flags are described in AcceptPayment.)