Skip to content

avivasolutionsnl/Heidelpay-SXC9-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example SXC9 plugin for Heidelpay

This repository contains an example implementation of a Sitecore Experience Commerce 9 plugin for the Heidelpay payment provider

This is a very basic, naive implementation and only serves as an example. It should by no means be used in production, for it misses error handling, tracing and only implements the happy flow.

Overview

This example implements the Heidelpay hCO payment flow, which looks like the following:

Flow

The solutions has the following projects:

Plugin.Payment.Heidelpay

This is the SXC9 Heidelpay plugin and contains most of the interesting stuff.

Heidelpay.Connect

This library contains a connect API for using the heidelpay functionality from the experience platform.

engine

This is a copy of the commerce engine project that is part of the SDK.

Plugin.sample.habitat

This is the habitat plugin from the SDK and is used to import the Habitat test catalog.

Sitecore.Commerce.ServiceProxy

The service proxy from the SDK that has been re-generated to contain the Heidelpay specific stuff.

website

A MVC website with some example MVC controllers and views to demo and test the functionality.

Getting started

  1. Setup docker This example uses the Aviva sitecore commerce docker images for development. Follow the instructions in that repository to build your own commerce docker images and run docker-compose up to start the environment.

You will probably need to update the names of the images in the docker-compose.yml file.

  1. Modify Heidelpay configuration The Heidelpay settings are defined in a Heidelpay policy. These can be modified by editing the environmet files under source/HeidelpayDemo/engine/data/Environments/Plugin.Habitat.Commerce*.json. At the bottom of these files there is an element that starts with:
"$type": "Plugin.Payment.Heidelpay.Policies.HeidelpayPolicy, Plugin.Payment.Heidelpay"

This element contains the Heidelpay specific settings.

  1. Build / Publish solution Just build the solution from Visual Studio. Right click publish the engine and website projects to publish them to the build folder in this repository. The docker containers are set up to automtically copy the files in that build folder.

  2. Bootstrap / Initialize the SXC9 engine Use postman to first bootstrap and then initialize the environment. This will import the Habitat test data into the environment.

  3. Run the demo Make sure the docker containers are available by running the whales-names NPM package. The demo site will be accessible at http://sitecore. Also, for Heidelpay to be able to reach the site and provide transaction feedback, the development machine needs to be accessible from the internet. ngrok is a handy tool for this, that allows you to create a tunnel. Make sure to map it to the same port as is configured in the docker file:

PS> ngrok http 8181

And make sure that the URl that is generated by ngrok is configured in the Heidelpay policy in the environment files (Don't forget to bootstrap).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages