WebSphere Commerce Version 8.0.4.0

Enabling Apple Pay on the Web

Enable Apple Pay on the Web by updating backend services to support the enhanced payment functions, and then by enabling the store function for the Aurora starter store.

Before you begin

  1. Review and ensure that you meet the requirements for using Apple Pay on the Web. For more information, see Getting Started with Apple Pay.
  2. Ensure that you register and verify your website for Apple Pay. For more information, see Website Registration and Verification for Apple Pay.
  3. Understand the Apple Pay on the Web sequential flows to get familiar with how the Aurora starter store interacts with Apple Pay on the Web: Apple Pay on the Web sequential flows.

Procedure

  1. Update backend services to support the enhanced payment functions.

    Apple Pay on the Web and WebSphere Commerce integration enable multiple interactions between WebSphere Commerce web pages and WebSphere Commerce server, WebSphere Commerce server and Apple Pay server, and WebSphere Commerce server and Payment Service Providers (PSP) such as IBM Payment Gateway server, which ensures seamless payment and checkout method.

    1. Create the merchant information by running the following sample SQL commands, replacing the identifiers with those that match your environment.
      For example,
      insert into merchant (merchant_id, member_id, name, state) values (10001, 7000000000000000251, 'AuroraESite', 1);
      insert into storemerch (store_id, merchant_id) values (10201, 10001);
      insert into merchconf (merchconf_id, merchant_id, paymentsystem, payconfgrp) values (10001, 10001, 'ApplePay', 'default');
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10001, 10001, 'merchantIdentifier','merchant.auroraesite',0);
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10002, 10001, 'domainName','www.auroraesite.com',0);
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10003, 10001, 'displayName','AuroraESite.COM',0);
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10004, 10001, 'supportedNetworks','amex,discover,masterCard,visa',0);
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10005, 10001, 'merchantCapabilities','supportsCredit,supportsDebit,supports3DS,supportsEMV',0);
      insert into merchconfinfo (merchconfinfo_id, merchconf_id, property_name, property_value, encrypted) values (10006, 10001, 'merchantCountryCode','US',0);
      
    2. Get the Apple Pay Merchant Identity Certificate.

      Refer to the Apple documentation for registering and verifying your website: Apple Pay JS - Apple Developer. The Merchant Identity Certificate that you get is linked to your domain name. It is used to authenticate your merchant sessions with the Apple Pay servers. To establish a TLS connection to Apple Pay servers, you can configure the certificates as follows:

      Import the Apple Pay Merchant Identity Certificate to WebSphere Application Server Administration Console's Key Store.
      1. Open the WebSphere Application Server Administration Console
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > Key stores and certificates > NodeDefaultKeyStore > Personal certificates.
      3. Click Import to import the new key store file.
      4. Click Get Key File Aliases.
      5. Select Certificate alias to import the certificate.
      6. Click Apply to save the changes.
      You also must add the Apple Pay server's CA signed certificate to the trust store for establishing the TLS connection:
      Import the CA signed certificate for Apple Pay server (https://apple-pay-gateway-cert.apple.com) to WebSphere Application Server Administration Console's Trust Store.
      1. Open the WebSphere Application Server Administration Console
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > Key stores and certificates > NodeDefaultKeyStore > Signer certificates.
      3. Click Add and enter the alias and file name.
      4. Click Apply to save the changes.
    3. Configure the SSL setting for Apple Pay merchant validation.
      1. Open the WebSphere Application Server Administration Console.
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > Dynamic outbound endpoint SSL configurations.
      3. Click New to configure the Apple Pay secure connection.
      4. Add the Connection information for Apple Pay's merchant validation server. For example:
        https,apple-pay-gateway-cert.apple.com,*
      5. Click Certificate alias and select personal certificate.
      6. Click Save.
    4. Modify the SSL protocol to TLS1.2.
      1. Open the WebSphere Application Server Administration Console.
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > SSL configurations > NodeDefaultSSLSettings.
      3. Click Quality of protection (QoP) settings under Additional Properties.
      4. Change the value of Protocol to TLSv1.2.
      5. Click Apply to save the changes.
    5. Modify the web server rewrite rule to ensure that Safari users use SSL for all store URLs.
      1. Open the WC_installdir/instances/instance_name/httpconf/httpd.conf file for editing.
      2. Under the RewriteEngine On line, add the following condition and rule:
        
        RewriteCond %{HTTP_USER_AGENT} Safari
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}  [L]
        
      3. Save your changes and close the file.
      4. Restart your web server.
  2. Select the Apple Pay store function to enable it in the Aurora starter store.
    1. Open the Store Management tool.
    2. In the explorer view filter, click Stores.
      The Stores list view displays, containing a list of the stores that you are authorized to work with.
    3. Right-click the store that you want to select the available store functions for; then click Open to open the properties view for the selected store.
      The available store functions for the store are displayed within separate tabs beside the Store Properties tab in the properties view.
      Note: Although each of these tabs is included in all of the WebSphere Commerce starter stores, various tabs might not display for your store if certain store functions are not available in that store, such as in an extended site scenario.
    4. Click the Checkout tab.
    5. Select the Apple Pay check box.
    6. Click Save and Close to save your changes.
    For more information, see Aurora starter store functions.
  3. Optional: Configure IBM Payment Gateway as the Payment Service Provider for Apple Pay on Web.
    1. Complete the IBM Payment Gateway onboarding process. Contact IPG onboarding team to configure the necessary merchant information on the IPG side.
    2. Configure the certificate for the IPG connection.
      1. Import the IPG server's signer certificate to the WebSphere Application Server Administration Console's truststore. The default truststore is \wasprofile\config\cells\localhost\nodes\localhost\trust.p12.
      2. Import the IPG's personal certificate to the WebSphere Application Server Administration Console's keystore. The default keystore is \wasprofile\config\cells\localhost\nodes\localhost\key.p12.
    3. Configure SSL for the IPG connection.
      1. Open the WebSphere Application Server Administration Console.
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > Dynamic outbound endpoint SSL configurations.
      3. Click New to configure the IPG secure connection.
      4. Add the Connection information for the IPG's server. For example, *,ips-preprod.ihost.com,*.
      5. Click Certificate alias and select the personal certificate that you previously imported.
      6. Click Save.
    4. Configure SSL for the default certificate.
      1. Open the WebSphere Application Server Administration Console.
      2. Depending on your environment configuration, go to: Security > SSL certificate and key management > SSL configurations > NodeDefaultSSLSettings.
      3. Select your WebSphere Commerce Server's certificate as the Default server certificate alias and Default client certificate alias values.
      4. Click Save.
    5. Enable IPG-specific command implementations.
      Run the following SQL to enable the command implementation for IPG:
      
      insert into CMDREG (storeent_id, interfacename, classname, target) values ($storeId, 'com.ibm.commerce.applepay.payment.commands.ProcessApplePayPaymentCmd', 'com.ibm.commerce.applepay.payment.ipg.ProcessApplePayPaymentIPGCmdImpl', 'Local');