Payment Extensibility Starter Kit
This guide explains the development setup needed to create a new payment gateway to implement through payment extensibility.
Dev Center Setup
Create a Dev Center Application
An application must be created first to access eCommerce environments.
- Log in to Dev Center.
- Click Develop > Applications.
- Click Create Application.
- In the Create application dialogue box, do the following:
- In the Name text box, enter a user-friendly name for the application, such as GatewayName Connector.
- In the Application ID text box, enter an ID for the application, such as gatewayName_connector.
- Kibo eCommerce appends the Application ID to the reverse domain name for your Dev Account. The allowed characters include numbers, letters, and underscore.
- Click Save.
Prepare an Endpoint
An endpoint must also be created to integrate with the application.
Prepare a web server that will host your payment gateway application.
Note the URL endpoint of the payment gateway application’s configuration page, such as https://<Domain>/<gatewayNameApp>/configure.
In Dev Center, open the application details page for your payment gateway application.
Click Packages, and then click the Details tab.
Under Configuration URL, add the URL endpoint of the payment gateway application’s configuration page.
Install the Application to a Sandbox
Installing the Dev Center application to a sandbox allows to you properly test configuring the application in a Kibo eCommerce tenant.
In the Application editor, click Install.
- Select your application and click OK.
Build the Starter Kit
Kibo eCommerce provides the starter kit as a starting point for a custom integration; therefore, you will need to download the source code, modify it as necessary, and then build and host it on your own web server.
Obtain the source code
Before you can build the starter kit, you'll need to obtain the source code:
- Go to https://github.com/Mozu/KiboPaymentAdapterTemplates.
- Clone the repository on your local computer.
The starter kit is built on Java. Kibo eCommerce recommends modifying the starter kit source code to suit your purposes using a Java-based IDE, such as the Eclipse IDE for Java Developers.
Once you have the Kibo eCommerce configuration file configured properly, you can then build the starter kit using Gradle. If you already have Gradle installed on your system you can build the application using the gradle build; however, Kibo eCommerce recommends using the included Gradle Wrapper (gradlew), because it ensures that the correct Gradle version is used to run the install task. Refer to Chapter 5. The Gradle Wrapper in the Gradle documentation for more information about the Gradle Wrapper.
To build the starter kit using the Gradle Wrapper:
- From the root folder, run gradlew build. If you don't already have Gradle installed on your system, the Gradle Wrapper automatically installs the correct Gradle version for the starter kit.
- Use the WAR file located at: root/build/libs in the following steps.
The included Gradle Wrapper also includes other Gradle tasks that you might find useful. For a complete list of all Gradle tasks, run gradlew tasks.
Deploy WAR File
The Gradle Wrapper builds a WAR file that you can then deploy on your own Java web server. Kibo eCommerce recommends using an Apache Tomcat web server to deploy the WAR file.
This WAR file is located at: root/build/libs.
Refer to the documentation for your selected web server for more information about configuring the web server and deploying the WAR file.
Once you've successfully deployed the WAR file to your web server, you can use the appropriate URLs in the Dev Center Setup section.
Map eCommerce success/failure codes
The following table describes the success/failure codes for eCommerce:
Returned when a request times out before eCommerce finishes processing it.
|Unauth||Returned when your request does not have valid authorization credentials.|
|Error||Returned if you submit an invalid request to eCommerce.|
|NotFound||Returned when eCommerce cannot find the gateway.|
Configure Additional Endpoints
|/authorizeandcapture||Accepts CaptureRequest.json and returns GatewayCaptureResponse.json.|
|/capture||Accepts CaptureRequest.json and returns GatewayCaptureResponse.json.|
|/credit||Accepts CaptureRequest.json and returns GatewayCreditResponse.json.|
|/void||Accepts CaptureRequest.json and returns GatewayVoidResponse.json.|
|/getbalance||Retrieves the balance available for the gift card.|