A recent engagement required me to setup and configure PayPal payments with Adxstudio. In this blog post, I will provide a step by step guide on how to setup PayPal (Sandbox) payments with Adxstudio on-prem portals. Once you setup a sandbox PayPal merchant account and test it with your portal, you’re ready to switch to PayPal live without a worry.

N.B: Please note that this guide is targeted at the Australian Developer Community.

The first requirement to setup Adxstudio portals with PayPal (Sandbox) would be creating a PayPal (Sandbox) merchant account.

Creating a PayPal (Sandbox) Merchant Account

  1. In order to create a PayPal merchant account, navigate to https://www.sandbox.paypal.com/, click on the navigation menu “Sell” and click on the “Get paid on your website” link. (If you already have a merchant account, you can skip this step).

configure paypal merchant account

  1. Click on the “Sign Up Now” button.

configure-paypal-merchant-account-2

  1. Provide the e-mail address that you wish to use for the merchant account and click on the “Next” button.

start-your-application

  1. Fill out the form with your Merchant information and click on the “Create Application” button.

configure-paypal-merchant-account-3

  1. Fill out the Business Information and click on the “Save and Continue” button.

configure-paypal-merchant-account-4

  1. Fill out the Business Contact Information and click on the “Save and Continue” button.

configure-paypal-merchant-account-5

  1. Click on the “Agree and Create Account” button.

agree-and-create-account

  1. Once your account is created, click on the “Go to Business Set-up” button.

go-to-business-setup

  1. Click on the “Profile” icon at the top right hand corner of the screen, and click on the “Profile and settings” link.

profile-and-settings-link

  1. In the “My Profile” screen click on the “Selling tools” link.

selling-tools

  1. In the “Selling tools” tab, click on the “Update” link found against “Website preferences”.

website-preferences

  1. In the “Website Payment Preferences” screen, select the “On” option for “Auto Return”.

You can create a custom page in Adxstudio to be the return page after the payment is made in PayPal. You may set the “Return URL” to https://<yourdomainname/<your-return-page>

Select the “On” option for “Payment Data Transfer”, then click on the “Save” button.

website-payment-preferences

  1. Copy the “Identity Token” as this will be required while configuring the Adxstudio Site Settings in Dynamics CRM.

identity-token

  1. In the “Selling tools” tab, click on the “Update” link found against “Instant payment notifications”.

instant-payment-notifications

  1. Click on the “Choose IPN Settings” button in the “Instant Payment Notification (IPN)” screen.

instant-payment-notification-ipn

  1. In the “Edit Instant Payment Notification (IPN) settings” screen, set the “Notification URL” to. Choose “Receive IPN messages (Enabled)” option found under IPN messages and click on the “Save” button.

edit-ipn-settings

 

Create Site Settings in Dynamics CRM

Make sure that you set the “Website” lookup to the correct portal record for each Site Setting record.

  1. Create/Edit “Ecommerce/PayPal/AccountEmail” site setting in the CRM.

Make sure that you set the “Value” attribute to the PayPal sandbox email that will be used to authenticate payment requests.

site-settings-in-dynamics-crm

  1. Create/Edit “Ecommerce/PayPal/PaypalBaseUrl” site setting in the CRM.

Make sure that you set the “Value” attribute to the PayPal sandbox URL as we’re only testing integration with PayPal.

site-settings-in-dynamics-crm-2

  1. Create/Edit “Ecommerce/PaymentProvider” site setting in the CRM.

Make sure that you set the “Value” attribute to PayPal.

site-settings-in-dynamics-crm-3

  1. Create/Edit “Ecommerce/PayPal/PDTIdentityToken” site setting in the CRM.

Make sure that you set the “Value” attribute to the Token value you copied while setting up PDT in PayPal.

site-settings-in-dynamics-crm-4

 

Testing Your PayPal Integration

Now it’s time to test whether our integration is working alright. To test you need a buyer account, you’d be able to create a test buyer account using https://developer.paypal.com I’m not covering the steps on creating test accounts using PayPal developer site in this post. Also I won’t be covering configuration needed to enable Adxstudio shopping cart. I will be testing my integration with a demo Adxstudio portal I created earlier.

I’ve already added a product to the shopping cart which I’m about to pay using PayPal.

  1. Screenshot below is from the last step (Purchase Summary) before a payment is processed, click on the “Next” button in the Purchase Summary screen.

testing-paypal-integration

 

testing-paypal-integration-2

The browser will be redirected to https://www.sandbox.paypal.com/au/cgi-bin/webscr

  1. In the PayPal payment form enter your PayPal buyer account information and click on the “login” button.

testing-paypal-integration-3

  1. Click on the “Pay Now” button, to complete the Payment.

testing-paypal-integration-4

 

You will be redirected to the page you configured while setting up PayPal “Website Payment Preferences”.

Let me know if you face any difficulties while integrating your Adxstudio portal with PayPal using this guide.

Till the next blog post from me. Happy CRMing folks!