Samples > Starter stores > Starter store enhancements > Digital wallet


Customize digital wallet service modules

You can customize the digital wallet implementation using existing Business Object Document (BOD) service module customization best practices and using its additional extension points to add new wallet item types.


Before you begin

Before you can complete the tasks outlined in this topic, make sure that you have completed the following prerequisite:


Procedure

  1. Customize the digital wallet BOD service module using existing BOD service module customization best practices.

  2. In addition to customizing the digital wallet BOD service module using existing BOD service module customization best practices, you can customize the digital wallet BOD service module using these additional extension points. You can use the following extension points to add new wallet item types:

    1. InsertMoreWalletItemTypeSpecificDataCmd

      This is a command called by InsertMoreWalletItemCmdImpl to populate the type-specific data of WalletItem nouns.

      For example, the following command implementation is used by the GetWalletItem service to insert coupon data:

      <cmdreg storeent_id="0" 
      interfacename="com.ibm.commerce.wallet.facade.server.commands.InsertMoreWalletItemTypeSpecificDataCmd+IBM_Store_Details.Coupon" 
      classname="com.ibm.commerce.wallet.facade.server.commands.InsertMoreWalletItemCouponDataCmdImpl"/>
      

      In addition, the WalletItem noun contains a Data noun part of type xsd:anyType. You can use a custom InsertMoreWalletItemTypeSpecificDataCmd implementation to populate this noun part with custom data.

    2. ProcessWalletItemTypeSpecificActionCmd

      This is a command called by the ProcessWalletItemActionCmd implementations to perform type-specific nouns.

      For example, the following command implementation is used by the ProcessWalletItem (Delete) service to delete the coupon using the coupon manager in the promotion component:

      <cmdreg storeent_id="0" 
      interfacename="com.ibm.commerce.wallet.facade.server.commands.ProcessWalletItemTypeSpecificActionCmd+Delete.Coupon" 
      classname="com.ibm.commerce.wallet.facade.server.commands.ProcessWalletItemDeleteCouponActionCmdImpl"/>
      

    For example, when adding new wallet item types, you can introduce order receipts for the store by extending the digital wallet services. Execute the following tasks:

    1. Define the order receipt database schema.

    2. Extend the wallet item noun to support order receipts. That is, define the logical schema of the WalletItem noun's Data noun part.

    3. Extend the digital wallet services to support the addition of order receipts to a digital wallet.

    4. Extend the appropriate order and payment commands, for example, OrderProcess, to create order receipts and add them to digital wallets by calling the digital wallet services.

    5. Extend the starter stores to support the displaying of order receipts by calling the digital wallet services.

  3. Deploy the customizations using the BOD command framework and the data service layer.


+

Search Tips   |   Advanced Search