Integrating PayPal Commerce with Aptify

Release 7.4 includes the PayPal Advance Checkout integration with Aptify Smart client and Aptify Web applications, and the PayPal Advance and Standard Checkout integration (only pay with PayPal) with Aptify e-business application. 

Standard Checkout helps you get set up quickly to accept PayPal and other payment methods, whereas Advanced Checkout helps you customize the checkout to match your site's branding. PayPal Advance Checkout allows you to create and customize your checkout to accept debit and credit card payments directly on your website, Refer to PayPal Checkout for more information. 

This document is organized in below sub-topics:

Configuring PayPal Commerce Merchant Account 

To configure PayPal Commerce in Aptify application, follow the steps below:

  1. Launch Aptify Smart Client
  2. Navigate to Order Entry Administration.
  3. Right-click Merchant Accounts service and select create New Merchant Accounts Record
  4. In General tab, fill in the details as mentioned below
    1. Merchant Account name: Enter the merchant account name. For example, Advance PayPal
    2. Organization: Select the name of the organization
    3. Manager: select the name of the Manager
    4. Authorization Type: Select AuthOnly if you want to authorize payments on order save or AuthCapture if you want to capture payments on order save.
    5. Keep other setting as per below screenshot and save the Merchant account. 
      GeneralTab.png
  5. In the PlugIns tab, fill in the following details exactly as given below. It is recommended to copy and paste the below values to avoid errors.
    1. AuthorizationAssembly: Aptify.PayPal
    2. AuthorizationObject : Integrations.Aptify.PayPal
    3. AuthorizationClass: Aptify.PayPal.PayPalElectronicPayment
    4. CaptureAssembly: Aptify.PayPal
    5. CaptureObject: Integrations.Aptify.PayPal
    6. CaptureClass: Aptify.PayPal.PayPalElectronicPayment
      PlugIns.png
  6. To set up your developer account:
    1. Sign up at the https://developer.paypal.com/.
    2. Access the Dashboard to create and manage sandbox and live API credentials.
    3. Create a sandbox account for testing before production deployment.
  7. To obtain API Credentials:
    1. Navigate to My Apps & Credentials in the PayPal Developer Dashboard.
    2. Under REST API Apps, create a new app or use an existing one.
    3. PayPal will provide:
      1. Client ID: Used to authenticate API requests.
      2. Secret Key: Used alongside the Client ID for secure authentication
  8. In the Attributes tab, Add below attributes,
    1. GatewayLocation:
    2. PartnerID: PayPal
    3. Username: Enter the Client ID obtained from step 7.3.1
    4. Password: Enter the Secret key obtained from step 7.3.2
    5. MerchantID: Enter the Aptify merchant account record id 
    6. IsLogging: true
    7. BNCode(Build Notation Code): Enter the BNCode. It is a tracking mechanism used by PayPal to identify the source or partner platform through which a transaction was initiated or process. 
    8. VerificationMethod3DS: Select the desired value from the drop-down. The values are SCA_WHEN_REQUIRED and SCA_ALWAYS. 
      Attributes.png
  9. In Currency Types tab, create Currency Types Record, for example US Dollar.
    PayPal_Currencytab.png
  10. In Payment Types tab, click new icon and create new Payment Type.
    PayPalNewPaymentTypes.png
    1. In General tab, enter the details as shown below:GTCreateNewRec.png  
      1. Name: Advanced PayPal
      2. Description: Advanced PayPal
      3. Type: select Advanced PayPal from dropdown
      4. Inflow: Selected
      5. Active: Selected
      6. Web Enabled: Selected
      7. Allow “Save for future use”: Selected
    1.  
    2. In Service Charge tab, enter the details as given below.
      ServiceCharge.png
    3. In GL Accounts tab, enter the details as shown in the below screenshot.
      PayPal_GL.png

Configuring PayPal Commerce in Smart Client

  1. Edit “Aptify Shell.exe.config” file under Aptify 5.0 folder to add below Key under appSettings section,
    <add key="Aptify.PayPal.MerchantAccountID" value="<<Enter the Aptify merchant account record id>>"/> 
    and update the file Aptify Shell.exe.config in ORO.
  2. Create a schedule task for on-premises instance and web job for Azure instance to run “PayPal Generate Access Token” process flow for every 6 hours repeatedly. Refer to Deploying Azure WebJobs for Schedule Tasks document for information on how to create Azure Web jobs.
    NewSTRecord.png
  3. Go to build package path, navigate to “DailyBuildSetupDeployment\Core Database Setup\Data\OtherSetups” and install Web view runtime engine as per the OS requirement.
    1. MicrosoftEdgeWebView2RuntimeInstallerX64 
    2. MicrosoftEdgeWebView2RuntimeInstallerX86
      OR
      download from here.

Configuring PayPal Advance Checkout in Aptify Web

To configure PayPal Commerce in Aptify Web application, follow the steps given below:

  1. Go to Web Services->Controller Configuration Collections and create All view
  2. Open Aptify Web Collection record and go to controller Configurations tab
  3. Click add new record, search and add below controllers one by one
    1. PayPalSdkUrlRequestService
    2. PayPalCreateOrderRequest
    3. PayPalGetOrderDetails
    4. PayPalCreateSetupToken
    5. PayPalCreatePaymentToken
  4. Save the record.
  5. Run the process flows as given below
    1. Search Entity ID of “Service Applications” (1795)
    2. Search Form Template ID of “Payment Information Control Template_Advanced PayPal Payment Transaction” (19401)
    3. Run the Process flow IDs 97,96 and 95 for above entity and form template ID and perform IIS reset.
    4. Go to Aptify Web IIS hosted code path for on premise hosted application OR app service kudu path for azure hosted.
    5. Edit below two config files
      1. Edit the web.config file present under AptifyServiceAPI folder and add below key.
        <add key="Aptify.PayPal.MerchantAccountID" value="<<Enter the Aptify merchant account record id> >" />  
      2. Edit the web.config file present under Aptify folder to add below mentioned urls in Content-Security-Policy key to allow the urls to load.
        1. https://www.sandbox.paypal.com
        2. https://www.paypal.com
        3. https://www.paypalobjects.com

Below is an excerpt from web.config file for illustration purpose.  

<httpProtocol>
<customHeaders>
<add name="Content-Security-Policy" value="default-src 'self'
https://AZUDEVAPT100002.cbae-cloud.com https://www.aptify.com
https://secure.bluepay.com https://fts-uat.cardconnect.com
https://www.sandbox.paypal.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self'
https://AZUDEVAPT100002.cbae-cloud.com https://secure.bluepay.com
https://graph.microsoft.com https://communitybrands-my.sharepoint.com
https://fts-uat.cardconnect.com https://eligibility.wootric.com
https://production.wootric.com https://wootric-eligibility.herokuapp.com
https://www.sandbox.paypal.com 'unsafe-inline' 'unsafe-eval' ; script-src 'self'
https://AZUDEVAPT100002.cbae-cloud.com https://secure.bluepay.com
https://communitybrands-my.sharepoint.com https://fts-uat.cardconnect.com
https://www.sandbox.paypal.com 'unsafe-inline' 'unsafe-eval' ; script-src-elem 'self'
https://AZUDEVAPT100002.cbae-cloud.com
https://www.paypal.com 'unsafe-inline' 'unsafe-eval' ; img-src 'self'
https://AZUDEVAPT100002.cbae-cloud.com https://p.sfx.ms
https://communitybrands-my.sharepoint.com data: 'unsafe-inline' 'unsafe-eval' ;style-src 'self' 'unsafe-inline'
https://www.paypalobjects.com https://fonts.googleapis.com; font-src 'self' data: 'unsafe-inline'
https://fonts.gstatic.com " />
</customHeaders>
</httpProtocol>

Configuring PayPal Commerce in e-Business 7.x

To configure PayPal in Aptify e-Business application. Edit the web.config file present under e-Business SOA folder and make below changes:

  1. <add key="Aptify.PayPal.MerchantAccountID" value="<<Enter the Aptify merchant account record id>>" />  
  2. <add key="Aptify.configuration.eBizReactUIURl" value="<< Enter e-Business domain url>>"/>

Making payments using PayPal Commerce in Aptify Smart Client and Web applications

Below steps demonstrate a payment process using PayPal Commerce for Shopping Carts Checkout process in Aptify Smart Client and Aptify Web application.

  1. Log in to Aptify Smart Client/ Aptify Web application.
  2. Create a new order, add the shipping and billing details. 
    For payment using PayPal Commerce, the shipping details like City, State, Zip and Country fields are required.
  3. Add product, select Advanced PayPal payment type from the drop-down and click Enter Payment Details. The PayPal SDK will load.
    PayPal_SmartClient&Web.png
  4. Enter the card details and click Pay now. This creates order in PayPal and the pop-up closes automatically.
  5. Save the Order. This authorizes or captures the payment as per the merchant account setting.

Making payments using PayPal Commerce in e-Business 7.x

Below steps demonstrate a payment process using PayPal Commerce for Shopping Carts Checkout process in e-Business 7.x application

Release 7.4 does not support PayPal Commerce for making Donations.
  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 Advanced PayPal option, Pay By Advanced PayPal button is displayed. 

    PayPalChoosePaymentMethod.png
  4. Click Pay By Advanced PayPal, Make a Payment form is displayed. 
    PayPal_MakePayment.png

    The form is divided into two sections. The top section is designated for making payments using Standard Checkout, as shown in the screenshot below. 
    PayPal_Standard_Option.png

    1. To make payment using Standard Checkout: 
      1. Click PayPal button. This redirects the user to the PayPal site.
      2. Log in using the PayPal credentials, all the cards saved under the PayPal account is displayed. select the payment option and click Agree & Pay Now to make the payment. After successful payment the user is navigated to the Order Confirmation Page.
        PaymentOption.png
    2. To make payment using Advanced Checkout Option, enter the card details and click Confirm Payment. After successful payment the user is navigated to the Order Confirmation Page.

      The section below the Standard Checkout is designated for making payments using Advanced Checkout option as shown in the below screen shot.
      PayPal_AdvanceForm.png

 

Note regarding Authorization Period Expiry:

If a user does not capture the payment within the 29 days window, set by PayPal, the authorized payment gets expired. In this case, the user needs to create a new payment to generate new authorization.

In Aptify we have added an entity attribute AuthorizationPeriodExpires in Payments entity to set the authorization period expiry value. By default, the value of this attribute is set to 29.
Reauthorize attribute.png

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

Comments

0 comments

Please sign in to leave a comment.