EC Integration Guide
EC Integration Guide
EC Integration Guide
2 Component Overview..................................................................................................... 1
2.1 Supported Features ............................................................................................................................. 1
2.2 Functional Overview ............................................................................................................................ 2
2.2.1 PayPal Express Checkout from Cart and Payment Page ........................................... 2
2.2.2 PayPal Credit ............................................................................................................................... 2
2.2.3 In-Context Checkout from Cart and Payment Page ................................................... 3
2.2.4 IPN ...................................................................................................................................................4
2.2.5 Reference Transactions ..........................................................................................................4
2.2.6 Stand-alone API Calls ............................................................................................................... 5
2.3 Use Cases.................................................................................................................................................. 5
2.4 Headings and Constraints ................................................................................................................. 5
2.5 Compatibility .......................................................................................................................................... 5
2.6 Privacy and Payment ........................................................................................................................... 5
Copyright Information
© 2018 PayPal, Inc. All rights reserved.
PayPal is a registered trademark of PayPal, Inc. The PayPal logo is a trademark of PayPal, Inc. Other
trademarks and brands are the property of their respective owners. The information in this
document belongs to PayPal, Inc. It may not be used, reproduced, or disclosed without the written
approval of PayPal, Inc.
Copyright © PayPal. All rights reserved. PayPal (Europe) S.à r.l. et Cie, S.C.A., Société en
Commandite par Actions. Registered office: 22-24 Boulevard Royal, L-2449, Luxembourg, R.C.S.
Luxembourg B 118 349
Consumer advisory: The PayPal™ payment service is regarded as a stored value facility under
Singapore law. As such, it does not require the approval of the Monetary Authority of Singapore.
You are advised to read the terms and conditions carefully.
Notice of Non-Liability
PayPal, Inc. is providing the information in this document to you “AS-IS” with all faults. PayPal, Inc.
makes no warranties of any kind (whether express, implied or statutory) with respect to the
information contained herein. PayPal, Inc. assumes no liability for damages (whether direct or
indirect), caused by errors or omissions, or resulting from the use of this document or the
information contained in this document or resulting from the application or use of the product or
service described herein. PayPal, Inc. reserves the right to make changes to any information herein
without further notice.
To integrate some features of this integration, you’ll need to modify the SiteGenesis
storefront cartridge.
2 Component Overview
2.1 Supported Features
Express Checkout Mark and Express Checkout Shortcut support the following
features:
PayPal Express Checkout allows users to check out from both the Shopping Cart
and Billing pages. During Express Checkout, users are redirected to the PayPal login
page. After authentication, the user is redirected to your website to continue the
checkout process by selecting a shipping method and placing their order. A typical
checkout process flow would include entering a shipping address, a billing address,
and payment information. PayPal provides the shipping address in the Express
Checkout flow.
Express Checkout makes it easier for buyers to pay online. It also enables you to
accept PayPal while retaining control of the buyer and the overall checkout flow.
On mobile devices, Express Checkout provides payment pages tailored for faster
checkout and for smaller mobile screens and keyboards.
To learn more about Express Checkout, see NVP/SOAP Express Checkout on the
PayPal Developer Portal.
In-Context checkout keeps your website in view while providing customers with a
streamlined and tightly-integrated checkout experience. The checkout experience
takes place in the popup window (mini-browser).
2.2.4 IPN
PayPal has developed the following use cases for the int_paypal/bm_paypal
cartridge:
2.5 Compatibility
The cartridge package consists the cartridge itself, SiteGenesis v2 with v103+
storefront cartridge reference application integration examples.
This integration requires access to the following customer data elements: Billing
Address, Shipping Address, Order Details, Customer Profile and some custom
properties of Customer Payment Instruments.
3 Implementation Guide
3.1 Setup
Two cartridges support this integration:
This controller contains common Handle and Authorize methods (start nodes), and
is called through the payment flow in the SiteGenesis COPlaceOrder controller
(pipeline).
3.2 Configuration
To integrate PayPal Expressor PayPal Credit, or Instant Payment Notifications, you
need to add int_paypal to your target site cartridge path.
To integrate PayPal Transactions Business manager extension, you need to add the
bm_paypal and int_paypal cartridges to your Business Manager cartridge path.
Here’s how:
1. Upload int_paypal and bm_paypal to your CI or development sandbox. Apply the standard
flow used to upload cartridges to your environment.
2. Upload and import metadata from the metadata folder. To do so, go to Business Manager
> Administration > Site Development > Site Import & Export. Then apply the standard
procedure for uploading metadata into the Commerce Cloud site. You can compress
metadata to a .zip archive (Figure 5) or upload it via XML files and import it separately.
3. Insert int_paypal into the cartridge path of a target site. To do so, go to Business Manager
> Administration > Sites > Manage Sites > Your Target Site > Settings and insert
int_paypal before your cartridges record, as shown in Figure 6. (For example,
int_paypal:sitegenesis_storefront_controllers:sitegenesis_storefront_core)
After installing the cartridge, you need to configure service and update PayPal
credentials (your API Signature and API Certificate). Here’s how:
1. Go to Business Manager > Administration > Operations > Services > Credentials.
Following recommended credentials objects may be listed to distinguish various types of
authorization that can be applied to int_paypal/bm_paypal:
o PayPal_Sandbox_Certificate_Credentials_SiteGenesis
2. Update credentials record(s), using the exact credentials from your PayPal merchant
account. You should specify PayPal API Username (User field) and PayPal API Password
(Password field) and chose to use either API Signature or Certificate.
3. If Signature is used, you need to uncheck “Use certificate” checkbox and fill “API Signature”
field.
4. If Certificate is used, you need to check “Use certificate” checkbox and upload Certificate.
NOTE: You must provide a *.p12 private key. To generate one, you can use the
OpenSSL utility. For details, see
https://developer.paypal.com/docs/classic/api/apiCredentials/.
7. Grant access to PayPal Transactions (the BM Extension feature) to the target roles (and
optionally, for the Business Manager “PayPal Transactions” extension). Here’s how:
a. Go to Business Manager > Administration > Organization > Roles & Permissions and
select the target role that needs to have access to PayPal Transaction management.
b. Select the Business Manager Modules tab in the drop-down list on top. You must
select your target site as the active context. (See Figure 10.)
c. Scroll to the PayPal Transactions module. Grant access to it by checking the checkbox
and clicking Update.
Once you do this, every Business Manager user with that role can manage PayPal
Transactions by selecting Business Manager > Merchant Tools> Ordering > PayPal
Transactions.
You must create Payment Processor record and configure the Payment Methods to
be used. Here’s how:
1. Go to Business Manager > Merchant Tools > Ordering > Payment Processors.
2. Create payment processor PAYPAL. (See Figure 11.)
3. Update Payment Instruments to use the PAYPAL payment processor. (See Figure 12)
4. Select your target site and go to Business Manager > Merchant Tools > Ordering >
Payment Methods.
5. Create or select the PayPal Payment Method and select PAYPAL as the Payment
Processor. This will be used for PayPal Express Checkout or PayPal Credit.
6. Click Select near the Image field and upload pp-acceptance-small.png. Select this
image for this payment method.
You can modify the appearance of the PayPal Credit banner by following below
steps:
1. Go to Business Manager > Merchant Tools > Site Preferences > Custom Site
Preferences > PayPal Branding.
2. Set your preferences for the following:
o Campaign ID for PayPal credit banner preference ID by Commerce Cloud Campaign ID.
o PayPal Credit Banner Width.
o PayPal Credit Banner Height.
You’ll find dimensions for the PayPal Credit banner on the PayPal Financing Portal
at https://financing.paypal.com/ppfinportal/adGenerator/webSize.
Your PayPal Credit banners will be shown according to your Campaign settings. Also
refer Section 7 for more marketing solutions and consumer insight.
Here’s how:
1. Go to Business Manager > Merchant Tools > Site Preferences > Custom Preferences.
You’ll see two new Custom Site Preference Groups (See Figure 13, Figure 14, and Figure 15.)
Each preference has its own description.
2. Click View for PayPal Express Checkout. Then select your preferred settings for the
preferences shown in Figure 14:
NOTE: If you don’t check (select) the preferences “Shipping Address Override” and
“Accept only confirmed shipping addresses,” you won’t be able to select the
option “PayPal does not display shipping address fields whatsoever” for the
“Display shipping address state” preference.
If you want to display a PayPal Credit banner on the Product Details Page, you must
add a code snippet to the
./cartridge/templates/default/product/product.isml template.
Add the following code snippet into the isdecorate tag (around line 20):
<isdecorate template="${DecoratorTemplate}">
<isinclude url="${productDetailUrl}"/>
<isif condition="${source != 'quickview'}">
<isinclude template="assets/paypalcreditbanner"/>
</isif>
</isdecorate>
If you want to display the PayPal Credit button on the Home Page, you must add
the following code snippet to the
./cartridge/templates/default/content/home/
pt_storefront.isml tag (around line 35):
If you want to display the PayPal Credit button on the Shopping Cart Page, you
must add the following code snippet to the
./cartridge/templates/default/checkout/cart/
cart.isml template (around line 899):
…
<isslot id="cart-footer" description="Footer for Cart page"
context="global" />
</div>
</isif>
<isinclude template="assets/paypalcreditbanner"/>
</isdecorate>
<div class="cart-actions">
<isif condition="${enableCheckout}">
<isinclude
template="paypal/cart/paypalButton"/>
</isif>
<form class="cart-action-checkout"…
</div>
<isloop
items="${pdict.CurrentForms.billing.paymentMethods.selected
PaymentMethodID.options}" var="paymentMethodType">
… around line 17
<label for="is-${radioID}">
<isif
condition="${dw.order.PaymentMgr.getPaymentMethod(paymentMe
thodType.optionId).getImage()}">
<img
alt="${Resource.msg(paymentMethodType.label,'forms',null)}"
src="${dw.order.PaymentMgr.getPaymentMethod(paymentMethodTy
pe.optionId).getImage().getAbsURL()}" />
</isif>
<isprint
value="${Resource.msg(paymentMethodType.label,'forms',null)
}"/>
</label>
…
</isloop>
<isif condition="${pdict.OrderTotal > 0}">
<fieldset>
... around line 155
<div class="payment-method <isif
condition="${!empty(pdict.selectedPaymentID) &&
<form xmlns="http://www.demandware.com/xml/form/2008-04-19"
secure="true">
... around line 35
<!-- fields for PayPal selection -->
<include formid="paypal" name="paypal"/>
<group formid="paymentMethods">
...
</group>
...
...
var app = {
init: function () {
...
window.sgDialog = require('./dialog');
window.sgUtil = require('./util');
}
};
...
6. Modify the
./cartridge/templates/default/checkout/billing/billing.isml
template. Add the following code before the <fieldset> tag (around line 44):
${Resource.msg('billing.addressheader','checkout',null)}
<div class="dialog-required"> <span
class="required-indicator">•
<em>${Resource.msg('global.requiredfield','locale',null)}</
em></span></div>
</legend>
<isinclude template="paypal/errorMessage"/>
...
./cartridge/templates/default/checkout/cart/pt_cart_UI.isml
...
<isinclude template="paypal/clientSideCss"/>
...
./cartridge/templates/default/checkout/cart/pt_cart_VARS.isml
...
<isinclude template="paypal/clientSideJs"/>
...
./cartridge/templates/default/checkout/cart/pt_checkout_UI.isml
...
./cartridge/templates/default/checkout/cart/pt_checkout_VARS.isml
...
<isinclude template="paypal/clientSideJs"/>
...
...
function decorateByShipToStorePrefix(storeName) {
return 'S2S ' + storeName;
}
...
function getShippingRequestData(lineItemContainer :
dw.order.LineItemCtnr) {
var shippingRequestData = new util.HashMap();
var defaultShipment : dw.order.Shipment =
lineItemContainer.getDefaultShipment();
var shippingAddress : dw.order.OrderAddress =
defaultShipment.getShippingAddress();
var storeName = shippingAddress.getFullName();
...
shippingRequestData.put('PAYMENTREQUEST_0_SHIPTONAME',
shippingAddress.custom.isStore ?
decorateByShipToStorePrefix(storeName) : storeName);
...
}
You can edit the Log Name Prefix, enable Communication Logs, and the Change
Credentials record for this service. This cartridge ships with four credentials records
that you should replace with your credentials. Depending on your preferred
authentication method (API Certificate or API Signature), you must select either
the Certificate credentials or the Signature credentials record. If you want to run
PayPal integration with the PayPal Sandbox environment, you must select either
the Sandbox or the Production credentials record.
If you’re using Signature as your PayPal API Credential, update the PayPal Signature
in Service Credentials object. To do so, select Business Manager > Administration
> Services > Credentials and update Service Credentials object used by Service
Definition int_paypal.http.nvp.payment.PayPal.CustomSiteID.
If you’re using Certificate as your PayPal API Credential, you need to check the
appropriate checkbox in Service Credentials object used by Service Definition
int_paypal.http.nvp.payment.PayPal.CustomSiteID. Make sure there is a
NOTE: Commerce Cloud uses a cache for service initialization scripts, so the
credentials record will be cached. To run service initialization after updating
your services credentials or Signature, switch to a different code version
and then switch back to the original version. This action will trigger the
service initialization scripts.
All requests are formed as Name=Value strings, separated by &. This format is
called NVP. To learn more about NVP, visit the PayPal Developer Portal page PayPal
Name-Value Pair API Basics.
This PayPal Integration cartridge supports the following PayPal Classic API calls:
• SetExpressCheckout
• GetExpressCheckoutDetails
• DoExpressCheckoutPayment
• GetTransactionDetails
• TransactionSearch
• DoAuthorization
• DoReauthorization
• DoVoid
• DoCapture
• RefundTransaction
• DoReferenceTransaction
• BillAgreementUpdate
Each of the API calls listed under API Calls is implemented as a stand-alone method
of the paypalApi module, and can be invoked from external code without
integration to SiteGenesis. However, you still need to configure custom preferences,
as shown in the following example:
NOTE: For a detailed description of parameters, see PayPal Name-Value Pair API
Basics.
To enable PayPal functionality for pipelines insert int_paypal_pipeline into the cartridge path of
a target site. To do so, go to Business Manager > Administration > Sites > Manage Sites >
Your Target Site > Settings and insert int_paypal_pipeline before int_paypal cartridge record,
3.6 Testing
You must obtain your own test account on the PayPal Developer Portal. If you can’t
create your own PayPal Sandbox account, contact PayPal support.
Copyright ©2018 PayPal Inc. All rights reserved. Operations and Maintenance | 24
4.2 Logs
This integration introduces a few new custom logs:
All log files are located in the Logs folder (under Administration > Site
Development > Development Setup > Logs). For example: https://paypal01-tech-
prtnr-na01-dw.demandware.net/on/demandware.servlet/webdav/Sites/Logs.
4.3 Availability
You can track availability by service status in the Commerce Cloud Business
Manager. (Go to Administration > Operations > Service Status >
int_paypal.http.nvp.payment.PayPal.CustomSiteID.) See Figure 17.
Copyright ©2018 PayPal Inc. All rights reserved. Operations and Maintenance | 25
Figure 17. PayPal Service Availability Chart
You can configure any availability options related to this PayPal integration via the
Commerce Cloud Service Profile Interface. (To do this, go to Administration >
Operations > Services > Service Profiles.). You can set a timeout for all requests,
enable the Circuit Breaker mechanism, and adjust the Rate Limit. Use
thePayPal_Default_Profile (shown in Figure 18) for this.
Copyright ©2018 PayPal Inc. All rights reserved. Operations and Maintenance | 26
Figure 18. PayPal Service Profile Settings
4.4 Support
Here’s how to get help and support from PayPal:
• PayPal Business support − Go to PayPal’s Common Questions and Help Topics page and
log in to your PayPal account.
• Technical Support − Go to the Merchant Technical Support home page.
• PayPal Site Notifications − Go to PayPal’s Get Notified webpage.
5 User Guide
5.1 Roles and Responsibilities
PayPal introduced no new roles with this integration. You’ll need to update existing
roles or create and update new ones if you want to use the Business Manager
extension PayPal Transactions.
You can search Orders placed within PayPal Express Checkout by the Commerce
Cloud Order Number (as shown in Figure 20) or by PayPal Transaction ID (as shown
In Figure 21).
Figure 20. Search Orders with PayPal Transaction by Commerce Cloud Order Number
You can see Transaction Details from the PayPal Payment Transaction of the actual
order by clicking Order Number or the Change link on the right. If an order has
more than one related transaction, you’ll see a selection box with all of the
transactions that are related to the current order (as shown in Figure 23).
Each type of transaction can have the following action buttons (shown in Figure 24,
Figure 25, and Figure 26):
PayPal delivers all payment related statuses through IPN. After a merchant’s action,
PayPal sends an IPN message to the Commerce Cloud end point and, depending on
the status of this action, updates the order transaction.
You’ll need to configure your IPN settings in the PayPal account to send IPNs to the
Ipn-Listener controller action. (To do so, select Profile > My selling tools > Instant
Payment Notification.) Your URL to Ipn Listener should look like this:
https://your_instance_domain/path_to_site_if_so/your_locale/
Ipn-Listener.
NOTE: PayPal recommends that you configure the URL alias for this path in the
Commerce Cloud’s Business Manager.
To learn more about configuring IPN, see Identifying Your IPN Listener to PayPal.
This integration of the PayPal Payment Link cartridge provides several changes to
the Commerce Cloud SiteGenesis storefront:
1. PayPal Express Shortcut and PayPal Credit Shortcut on the Shopping Cart Page (Figure 32).
2. PayPal Express Mark and PayPal Credit Mark on the Payment Page (Figure 33).
Figure 33. Payment Method Select (1. Optional PayPal Express, 2. Optional PayPal Credit
3. PayPal Reference Transactions. (For more information, visit the following page on the
PayPal Developer portal: https://developer.paypal.com/docs/classic/express-
checkout/integration-guide/ECReferenceTxns/.)
To enable Reference Transactions for checkout, you need to configure your Billing
Agreement State custom preference. You’ll find it under Business Manager >
Merchant Tools > Site Preferences > Custom Site Preferences > PayPal Express
Checkout. (See Figure 34.)
If you enable a Billing Agreement, the buyer can save their PayPal account during
checkout on the Payment page.
If a buyer previously saved their account during checkout and the checkbox “Use
my stored PayPal account to pay” is checked (this checkbox is checked by default),
the user won’t be redirected to PayPal. Instead, the PayPal Billing Agreement will be
used to fulfill the payment.
The buyer can either use regular PayPal payment, or create a new Billing
Agreement.
PayPal UK merchants can use this feature to present financing options, such as
installment, same-as-cash, and no-interest options, to buyers paying for goods or
services.
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 37
6.2 Functional Overview
To make any call to PayPal REST API needs to use paypalRestApi.js module.
This module has method call(methodType, path, data, contentType).
Example 1:
var paypalApi =
require('*/cartridge/scripts/paypal/paypalRestApi');
var responseData = paypalApi.call('GET', 'credit/active-
merchant-financing-options?country_code=US');
Example 2:
var paypalApi =
require('*/cartridge/scripts/paypal/paypalRestApi');
var responseData = paypalApi.call('POST',
'credit/calculated-financing-options', {
financing_country_code: 'US',
transaction_amount: {
value: 100.5,
currency_code: 'USD'
}
});
Before making calls the service configuration and credentials should be configured.
paypalApi.credit.getActiveMerchantFinancingOptions(countryCode)
var paypalApi =
require('*/cartridge/scripts/paypal/paypalRestApi');
var reponseData =
paypalApi.credit.getActiveMerchantFinancingOptions('US');
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 38
paypalApi.credit.getCalculatedFinancingOptions(requestData)
var paypalApi =
require('*/cartridge/scripts/paypal/paypalRestApi');
var reponseData =
paypalApi.credit.getCalculatedFinancingOptions({
financing_country_code: 'US',
transaction_amount: {
value: 100.5,
currency_code: 'USD'
}
});
creditFinancialOptionsHelper.getDataForAllOptionsBanner(costValue,
currencyCode, countryCode) – returns object with all options (INST-type) and
other helpful information
var creditFinancialOptionsHelper =
require('*/cartridge/scripts/paypal/paypalCreditFinancingOp
tionsHelper.js');
var allOptionsData =
creditFinancialOptionsHelper.getDataForAllOptionsBanner(100
.5, 'USD', 'US');
creditFinancialOptionsHelper.getDataForAllOptionsBanner(costValue,
currencyCode, countryCode, creditType) – returns all options by a credit type
var creditFinancialOptionsHelper =
require('*/cartridge/scripts/paypal/paypalCreditFinancingOp
tionsHelper.js');
var allOptions =
creditFinancialOptionsHelper.getAllOptions(100.5, 'USD',
'US', 'INST');
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 39
creditFinancialOptionsHelper.getDataForAllOptionsBanner(costValue,
currencyCode, countryCode, creditType) – returns lowest monthly payment cost
(INST-type)
var creditFinancialOptionsHelper =
require('*/cartridge/scripts/paypal/paypalCreditFinancingOp
tionsHelper.js');
var lowestCost =
creditFinancialOptionsHelper.getLowestPossibleMonthlyCost(1
00.5, 'USD', 'US');
/Sites-SiteGenesis-Site/en_US/PaypalCreditFinancingOptions-
GetAllOptionsData?currencyCode=USD&isGetCartTotalAsValue=true
OR /Sites-SiteGenesis-Site/en_US/PaypalCreditFinancingOptions-
GetAllOptionsData?currencyCode=USD&value=228
These methods and endpoints can be used for creating custom presentation of
Credit options.
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 40
6.3 Presentment examples
<script
src="${URLUtils.staticURL('/js/paypalCreditFinancingOptions
.js')}" async="async" ></script>
<link rel="stylesheet"
href="${URLUtils.staticURL('/css/paypalCreditFinancingOptio
ns.css')}" />
Examples:
<isset name="paypalCalculatedCost"
value="${dw.value.Money(100, 'USD')}" scope="page"/>
<isinclude
template="paypalCreditFinancingOptions/lowerCostPerMonth"/>
OR
<isset name="paypalCalculatedCost"
value="${dw.value.Money(100.5, 'USD')}" scope="page"/>
<isinclude
template="paypalCreditFinancingOptions/lowerCostPerMonthBan
ner"/>
OR
<isset name="paypalCalculatedCost"
value="${dw.value.Money(69.99, 'USD')}" scope="page"/>
<isinclude
template="paypalCreditFinancingOptions/allOptionsBanner"/>
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 41
NOTE: The pages where these banners will be included should be cached
NOTE: These banners use PayPal REST API, the service configuration must be
done (see the part 6.4.1 Service configuration and credentials). Also, their
visibility is depended on configuration in Business Manager > Merchant
Tools > Site Preferences > Custom Site Preferences > PayPal Branding (see
the part 6.4.2 Presentments visibility configuration).
File templates/default/product/producttile.isml:
<isloop items="${prices}"
var="productPrice">
<span
class="${productPrice.class}"
title="${productPrice.title}"><isprint
value="${productPrice.value}"/></span>
</isloop>
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 42
</div>
<isscript>
var paypalCalculatedCost = SalesPrice ||
StandardPrice;
if
(pdict.CurrentHttpParameterMap.pricerange.stringValue ==
'true') {
paypalCalculatedCost =
dw.value.Money(pdict.CurrentHttpParameterMap.minprice,
session.getCurrency().getCurrencyCode())
}
if (SalesPrice && !SalesPrice.available) {
paypalCalculatedCost = StandardPrice;
}
if (Product.productSet) {
paypalCalculatedCost = null;
}
</isscript>
<isinclude
template="paypalCreditFinancingOptions/lowerCostPerMonth"/>
</isif>
<iscomment>Promotion</iscomment>
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 43
6.3.3 Presentment for product details page
File templates/default/product/producttile.isml
<isif condition="${!isQuickView}">
<isscript>
var paypalCalculatedCost = SalesPrice ||
StandardPrice;
if (pdict.Product.priceModel.isPriceRange()) {
paypalCalculatedCost =
pdict.Product.priceModel.minPrice;
}
</isscript>
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 44
<isinclude
template="paypalCreditFinancingOptions/lowerCostPerMonthBan
ner"/>
<div class="product-info">
<h2 class="visually-hidden">Additional
Information</h2>
<isset name="vags"
value="${pam.getVisibleAttributeGroups()}" scope="page"/>
<isset name="showAttributes" value="${false}"
scope="page"/>
File templates/default/product/producttopcontentPS.isml
</div>
<isset name="Product" value="${OrigProduct}" scope="pdict"
/>
<isscript>
var paypalCalculatedCost = SalesPrice || StandardPrice;
if (pdict.Product.priceModel.isPriceRange()) {
paypalCalculatedCost =
pdict.Product.priceModel.minPrice;
}
</isscript>
<isinclude
template="paypalCreditFinancingOptions/allOptionsBanner"/>
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 45
Clicking on “Click for details”, will extend the banner.
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 46
6.4 Configuration
The configuration page Business Manager > Merchant Tools > Site Preferences >
Custom Site Preferences > PayPal Branding has two fields related with this
functionality:
Copyright ©2018 PayPal Inc. All rights reserved. Financing Options API (Installment Calculator – for UK merchants only) | 47
1. Enable PayPal UK Credit Financial Options Banners – solves visibility of all
presentments.
Get powerful marketing tools designed to help increase your sales. Your PayPal
Business account now includes unique shopper insights and customizable
incentives from PayPal for your website, at no extra cost.
Copyright ©2018 PayPal Inc. All rights reserved. PayPal Marketing Solutions | 48
7.2 Integration points
<isinclude template="paypal/marketingSolutions"/>
File templates/default/product/pt_productdetails_VARS.isml
...
<isinclude template="paypal/marketingSolutions"/>
• templates/default/product/pt_productdetails_VARS.isml
• templates/default/account/pt_account_VARS.isml
• templates/default/checkout/pt_checkout_VARS.isml
• templates/default/checkout/pt_orderconfirmation_VARS.isml
Copyright ©2018 PayPal Inc. All rights reserved. PayPal Marketing Solutions | 49
• templates/default/content/pt_customerservice_VARS.isml
• templates/default/error/pt_error_VARS.isml
• templates/default/search/pt_categorylanding_VARS.isml
• templates/default/search/pt_productsearchresult_VARS.isml
• templates/default/search/pt_storelocator_VARS.isml
PayPal Marketing Solutions ID can be retrieved by visiting this link and clicking on
“Other”. It is posted in the url or in the code snippet as shown in the figure below.
Copyright ©2018 PayPal Inc. All rights reserved. PayPal Marketing Solutions | 50
8 Known Issues
PayPal functionality creates a Billing Address in the buyer’s Basket right before
redirecting the buyer to the PayPal Express Flow. If the buyer wants to cancel
payment on the PayPal side, they must click Cancel and return to Merchant’s
store.
In this case, the buyer will be returned to your store, but the billing address will be
empty.
This case is uncommon. You can add extra checking to avoid it to the
minibillinginfo.isml template.
...
${Resource.msg('minibillinginfo.billingaddress','checkout',
null)}
</h3>
<div class="details">
<isminicheckout_address
p_address="${billingAddress}"/>
</div>
</div>
</isif>
...