Client Pay Portal
 integrating with paypal express and kentico

Integrating PayPal Express with Kentico 8 - Part 1

Nearly every project I have developed with Kentico has required integration with a variety of 3rd party and backend systems. Ecommerce sites are notorious for this and are often the most customized of applications. With numerous payment processors available, Kentico can’t have native code for all of them but makes it very easy to do for the knowledgeable developer. This blog series is an overview of integrating one of the most popular ones around, PayPal Express.


Part 1 – The Process

Understanding how to integrate with PayPal express starts with understanding how the process flows. This is varies depending on the flavor of PayPal you’re working with.

The PayPal “Standard” process is:
 


Note

You can read more about Kentico’s built-in PayPal integration here.
While this is a solid process, there are definitely areas that can be streamlined to improve user satisfaction and increase sales. PayPal introduced PayPal Express for this very reason.

The PayPal Express process works like this:
 

As you can see, PayPal Express streamlines part of the process and elimates the unnecessary step from the PayPal Standard process. Additionally, the user can be authenticated with PayPal and that information is available to your Kentico site when they come back to complete the purchase. Automating that process is where the custom Kentico code comes in.


What’s Happening Behind the Scenes

With PayPal Express, there are less calls than a traditional integration. These ”fewer” calls are facilitated by passing unique values to and from the PayPal system. Using these values, you can get / store data and retrieve them on the other end to then use in some other functionality.

Here’s what the data handoff look as like:
 

The simplicity of setting up a token and passing it back and forth facilitates all of the communication that is required. Additionally, once the user logs into PayPal, the token record is updated with their user information. Once the user comes back to Kentico (passing the response), this data can be used to create an account and log the user in. This eliminates the user having to authenticate both in Kentico and PayPal.


What We Will Need

To DoSo what will we need to do to accomplish this? It’s pretty simple, actually. It breaks down into a few steps:
 
  1. Create a Custom Payment Gateway
  2. Add functionality to generate a token by passing the order information
  3. Add functionality to process the response back from PayPal
  4. Add functionality to complete purchase on PayPal
  5. Anything else you want to do extra

In the next blog(s) I will cover these steps, start with Creating the Custom Payment Gateway that is going to process the PayPal functionality and get the process going.


On to Part 2!

Let's see some code!
 

Author

Wiz E. Wig, Mascot & Director of Magic
Wiz E. Wig

Director of Magic