CardPointe Integration Phase 3: Apple Pay Implementation

Starting release 7.3, Apple Pay has been integrated into Aptify CardPointe payment platform in Aptify eBusiness 7.x application. Apple Pay is a mobile payment and digital wallet service developed by Apple Inc. Apple Pay allows users to make secure and convenient transactions using Apple devices including iPhones, iPads, Apple Watches, and Mac computers.

The integration of Apple Pay acceptance and CardSecure tokenization enables Aptify customers to pay quickly and securely using payment data stored in an Apple Pay wallet. CardSecure handles the decryption and tokenization of the customer's payment data while Apple Pay enables a quick, seamless checkout experience. 

Note: Saved Payment Method is not supported with Apple Pay

Below topics cover the setup and configuration details to integrate Apple Pay with Aptify using CardPointe payment platform.

Configuring an Apple Pay Merchant Account on Apple Developer Portal

To configure an Apple Pay merchant account on Apple developer portal, perform the following steps. For more details refer to Apple Pay Developer Guide.

Creating Merchant ID on Apple Developer Portal  

  1. Log in to https://developer.apple.com/account.
  2. Select the option Certificates, IDs & Profiles link.
    MicrosoftTeams-image (81).png

  3. Select the Merchant IDs link under Identifiers.
    MicrosoftTeams-image (82).png
  4. Click the Identifiers + icon to create a new Merchant ID.
    MicrosoftTeams-image (83).png
  5. Create Apple Pay Payment Processing Certificate, sign it and share with CardPointe. To generate a .p12 file using Keychain Access (Mac only), follow the steps given in Creating Certificate on MAC

  6. Create Apple Pay Merchant Identity Certificate and upload it on the web server. 
    To generate the .p12 file using Keychain Access (Mac only), follow the steps given in Creating Certificate on MAC

    For example, in e-Business we have uploaded the .p12 on the SOA layer under certificates folder - /wwwroot/SOA/Certificate/merch id cer.p12. The certificate along with the Request Headers is sent internally whenever we request an Apple Pay Session.
    ApplePay_2.png
  7. Click Add Domain under Merchant Domains in the Apple Developer Portal. Once you add a domain, you will get a text file like "apple-developer-merchantid-domain-association.txt".

    Place the text file in /.well-known path in Aptify. For example, in the current scenario, we are first mapping the /.well-known path with physical path "site/wwwroot/UI" as shown in the below screenshot.
    image (1).png
    Then we are placing the file "apple-developer-merchantid-domain-association.txt" in e-Business website under UI folder so the URL should be - "https://aptify70ebiz7multitenancy.azurewebsites.net/.well-known/apple-developer-merchantid-domain-association.txt" 
    ApplePay_1.png

Creating Certificate on MAC

To generate a .p12 file using Keychain Access (Mac only). Follow the steps given below. For generating certificate using other methods refer to Generate a .p12 file for Apple Pay

  1. In the Applications folder on your Mac, open the Utilities folder and launch Keychain Access
  2. Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority
  3. In the Certificate Information window, enter in the following information:
    • Enter your email address and create a name for your private key
    • Leave the CA Email Address empty
    • In the Request is group, select the Saved to disk option
    • Select Let me specify key pair information
  4. Select Continue within Keychain Access and select the file location
  5. Set the Key Pair Information to the following:
    • Algorithm: ECC
    • Key_size: 256 bits
  6. Click Continue within Keychain Access to complete the CSR generating process.

Configuring Apple Wallet on Apple Device

1. Open Settings App on the device

2. Find Wallet & Apple Pay service or type Apple Pay or Wallet in search box

3. Select Wallet & Apple Pay

4. Add Card if already not added. This step is optional.

Configuring Apple Pay Attributes in e-Business SOA Web.config

Make sure following attribute values are present in the web.config file.

<!--CardPointe Digital Wallet Tokenize endpoint-->
<add key="Aptify.Applications.Payments.CardPointe.TokenizeResourceEndpoint" value="/cardsecure/api/v1/ccn/tokenize" />
<add key="Aptify.Services.ApplePayCertificatePath" value="yourApplePayCertificatePath"/>
<add key="Aptify.Services.ApplePayInitiativeContext" value="yourDomain" />
<add key="Aptify.Services.ApplePayCertificatePassword" value="yourApplePayCertificatePassword"/>
<add key="Aptify.Services.ApplePayMerchantDisplayName" value="yourApplePayMerchantName"/>


Refer the below screenshot for example:
ApplePay_3.png

Creating new Payment Type for Apple Pay in Aptify

  1. Log in to Aptify as an "Admin User".
  2. Go to Order Entry Administration Application.
  3. Right click Payment Types service and select the "New Payment Types Record" option.
  4. Enter the following details:
    1. Name - As per your choice
    2. Type - Apple Pay
    3. Select the Inflow, Active, WebEnabled checkboxes as per your requirement.
    4. Enter the required information in the other tabs to complete the payment type setup.
    5. Save and close the record. 

Configuring the CardPointe merchant account for Apple Pay in Aptify

  1. Log in to Aptify as an "Admin User".
  2. Go to the Order Entry Administration Application.
  3. Select CardPointe Merchant Account
  4. In the Payment Types tab, add the necessary payment types to be used for payment, including the newly created payment type for the Apple Pay. 

 

Making payment on e-Business 7.x using Apple Pay in Aptify

Below steps demonstrate a payment process using Apple Pay for Shopping Carts Checkout process.

  1. Log in to e-Business 7.x
  2. Add a product to the cart and navigate to the Checkout Page.
  3. Under Choose your payment method expand Apple Pay option, Apple Pay button is displayed.

4. Click Apple Pay, an Apple Payment Form is displayed.

5. Select the card, fingerprint or pin input is asked, once the authorization process is complete the payment is made.

6. After successful payment, Order Confirmation page is displayed along with the Order Details and payment Type as Apple Pay.

Below screenshot displays the Orders details in Aptify Web application.

MicrosoftTeams-image (87).png

Apple Pay Backend Implementation details in Aptify

Apple Pay implementation details

Endpoint details

For Apple Pay integration with e-Business 7.x, JSON endpoints have been created in the SOA layer. The endpoints interact with the CardPointe Merchant and are responsible for processing the Order, Payment's etcetera in Aptify.

Below are the details of the endpoints:

  • Get Apple Pay Session endpoint - POST v1/GetApplePaySession
    This is the 1st call which gets invoked when Apple Pay Button is clicked. It is an endpoint in ebusiness, which returns the Apple Pay Session requested by the Frontend.
    We utilize the Token from that Response and then use this to Complete Merchant Validation on the Frontend. On Payment authorized, a handler is invoked on Frontend, which later calls below Tokenize endpoint.
  • Tokenize endpoint - POST v1/CardPointe/ccn/tokenize
    This is base endpoint for generating the CardPointe token. This is a POST endpoint, which takes the Data returned by the Google from the (iFrame) and returns the CardPointe token. This token is later passed in the Authorization/Capture request to the CardPointe.

    The tokenize endpoint is invoked on every call wherever payment is made using Apple Pay. For example, on checkout page, when user clicks Apple Pay, and makes payment on Apple form, this tokenize endpoint is called, which returns the CardPointe token and then it calls the Checkout/ApplePay endpoint passing in this token in the body of the request.
  • Non admin endpoints are as below:
    POST v1/ShoppingCarts/Checkout/ApplePay
    POST v1/ProfilePersons/{id}/OrderHistory/MakePayment/ApplePay
    POST v1/Fundraising/Checkout/ApplePay
    POST v1/MembershipApplication/Checkout/ApplePay
  •  Admin endpoints are as below:
    POST v1/admin/company/{id}/ShoppingCarts/Checkout/ApplePay
    POST v1/admin/company/{id}/OrderHistory/MakePayment/ApplePay

Frontend details

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.