Payment Gateway Integration | EasyStore - Documentation | JoomShaper

EasyStore

Updated Last: 24 April 2024

Payment Gateway Integration

This documentation is designed to assist developers in implementing their preferred payment gateway in EasyStore.

The provided sample plugin, available for download, exemplifies the required structure and files necessary for successful implementation.

Download Sample Plugin

Prerequisites

Before proceeding, ensure that you have the following:

  • Basic knowledge of PHP and Joomla CMS.
  • EasyStore is installed and configured on your Joomla site.

Getting Started

  1. Download the provided sample plugin from the documentation.
  2. Extract the downloaded file and open it in your preferred code editor.
  3. Familiarize yourself with the structure of the plugin files.

File Structure

Upon downloading the sample plugin, open it in a code editor to explore the following file structure:

  • assets/images:
    • Folder for storing images, including the logo of your payment gateway (make sure to name your image file as logo.svg).
  • Services:
    • Inside the Services folder, you'll find provider.php.
  • Src:
    • Inside the Src folder, you'll find three subfolders:
      • Extension
      • Helper (Optional): SampleHelper.php can be defined here if needed.
      • Utils
    • sample.xml

src Folder

a. Extension Subfolder

Inside the Extension subfolder, you'll find SamplePayment.php. This file contains the logic and functions necessary for integrating your payment gateway.

b. Utils Subfolder

Inside the Utils subfolder, you'll find SampleConstants.php. This file holds essential constants required for the proper functioning of the payment gateway integration.

sample.xml

This XML file provides configuration details and serves as a reference for the integration process.

Implementation Guide

We will now walk you through each file, highlighting areas where modifications are necessary to integrate your preferred payment gateway seamlessly.

  1. Upload the logo of your payment gateway as logo.svg format inside the assets folder.
  2. Sample.xml
  3. Replace "Sample" with the name of your payment gateway in the Provider.php file.
  4. Define any helper class if needed in the Helper.php file.
  5. SamplePayment.php
  6. SampleConstant.php