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.
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
- Configuring Apple Wallet on Apple Device
-
Configuring Apple Pay Attributes in e-Business SOA Web.config
- Creating new Payment Type for Apple Pay in Aptify
- Configuring the CardPointe merchant account for Apple Pay in Aptify
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
- Log in to https://developer.apple.com/account.
- Select the option Certificates, IDs & Profiles link.
- Select the Merchant IDs link under Identifiers.
-
Click the Identifiers + icon to create a new Merchant ID.
- 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
- 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.
- 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.
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"
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.
- In the Applications folder on your Mac, open the Utilities folder and launch Keychain Access
- Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority
- 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
- Select Continue within Keychain Access and select the file location
- Set the Key Pair Information to the following:
- Algorithm: ECC
- Key_size: 256 bits
- 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:
Creating new Payment Type for Apple Pay in Aptify
- Log in to Aptify as an "Admin User".
- Go to Order Entry Administration Application.
- Right click Payment Types service and select the "New Payment Types Record" option.
- Enter the following details:
- Name - As per your choice
- Type - Apple Pay
- Select the Inflow, Active, WebEnabled checkboxes as per your requirement.
- Enter the required information in the other tabs to complete the payment type setup.
- Save and close the record. 
Configuring the CardPointe merchant account for Apple Pay in Aptify
- Log in to Aptify as an "Admin User".
- Go to the Order Entry Administration Application.
- Select CardPointe Merchant Account
- 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.
- Log in to e-Business 7.x
- Add a product to the cart and navigate to the Checkout Page.
- 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.
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
- Frontend implementation is done by referring to https://developer.apple.com/library/content/samplecode/EmporiumWeb/Introduction/Intro.html, and building Aptify.Apple.js wrapper js which invokes the methods of Apple Pay JS
- On the landing pages of the Apple Pay option, Apple Pay Panel has been loaded, which has ApplePay button and is responsible for making payments on Apple Payment Form
Comments
Please sign in to leave a comment.