Giter Site home page Giter Site logo

mastercard-gateway / gateway-prestashop-module Goto Github PK

View Code? Open in Web Editor NEW
11.0 6.0 12.0 1.21 MB

Prestashop module for Mastercard Payment Gateway Services

License: Apache License 2.0

PHP 84.24% JavaScript 1.11% Smarty 14.45% Makefile 0.20%
prestashop-module mpgs

gateway-prestashop-module's Introduction

Mastercard Payment Gateway Services module for PrestaShop

Compatibility

The module has been tested with the PrestaShop versions:

  • 1.7.4.4
  • 1.7.5.0
  • 1.7.5.2
  • 1.7.6.2
  • 1.7.6.4
  • 1.7.7.8
  • 1.7.8.3

Obtain the module

You can obtain the module by downloading a release from: https://github.com/Mastercard-Gateway/gateway-prestashop-module/releases - the module is licensed using Apache License 2.0.

Installation in PrestaShop

Please refer to official Prestashop documentation for general installation guidelines
https://addons.prestashop.com/en/content/13-installing-modules

Feature Support

Prestashop Mastercard Payment Gateway Service module supports following list of features:

  • Card payments
  • Alternative payment methods
  • Hosted Session
  • Hosted Checkout
  • Full refunds
  • Partial refunds
  • AVS
  • 3DSv1
  • 3DSv2

Documentation

The official documentation for this module is available on: http://ontap.wiki/prestashop-mastercard-payment-gateway-services

General settings

Once you have the Mastercard Payment Gateway Service module installed, you can configure the module from admin panel.

Find the relevant Configure button under your Module Manager:

Firstly, it’s important to configure your gateway credentials in TEST mode and make sure that everything works.

Note: that if gateway credentials are not configured correctly, you can not enable any of the modules payment methods.

If the gateway credentials are incorrect for any reason, there will be a warning displayed on the top of the configuration page.

The General Settings view:

Name Description
Live Mode Yes/No. Toggles between Test and Live mode. Both modes have their own set of credential fields which you need to fill separately. It gives you the ability to switch between modes without re-entering your credentials every time.
API Endpoint The API endpoint should be selected based on your account region.
Send Line Items Yes/No. This setting allows you to choose if you want shopping cart data to be sent to the gateway, this includes product information, grand total, etc.
Test Merchant ID / Merchant ID Your merchant ID.
Test API Password / API Password Your merchant API password.
Test Webhook Secret / Webhook Secret If webhook support is enabled, then enter your webhook secret here.

Hosted Checkout integration

The Hosted Checkout model allows you to collect payment details from your payer through a payment page displayed within a lightbox hosted by the payment gateway. You never see or handle payment details directly because these are collected by the hosted payment interface and submitted directly from the payer's browser to the payment gateway.

Below are list of Hosted Checkout method configuration which you will find in the administration interface:

Name Description
Enabled Two Options are available:
YES - to enable this payment method for Mastercard Payment Gateway Module
NO - to disable this payment method
Title Text mentioned here will be appear on front-end checkout page / payment method section.
Theme Leave blank unless indicated by your payment provider.
Payment Model Select any One option from below:
Purchase - Fund will be transferred to merchant account as soon as user’s entered card details has been successfully verified and order is placed.
Authorize & Capture - 2 stage process; where once order will place, it will only authorize user’s card details. Payment amount need to be captured manually by merchant.
Order Summary display Select any One option from below:
Hide - to not display any order and card details to user before submitting order
Show - to display order and entered card details to user before submitting order
Show (without payment details) - to display only order details to user before submitting order

Hosted Session integration

Choose the Hosted Session model if you want control over the layout and styling of your payment page. The Hosted Session JavaScript client library enables you to collect sensitive payment details from the payer in payment form fields, sourced from and controlled by Mastercard Payment Gateway. The gateway collects the payment details in a payment session and temporarily stores them for later use. You can then include a payment session in place of payment details in the transaction request to process a payment.

There are two different payment flow methods under Hosted Session integration:

  1. Purchase (Pay)
    If Purchase has been selected for Payment Model, then transaction will be done automatically. After user has entered card detail and submit order, amount of total order will be deducted from user’s card and will be automatically transferred to merchant’s account. It may take some time for reflecting amount into merchant’s account, but the process will be automatic.
  2. Authorize & Capture
    If Authorize & Capture has been selected for Payment Model, then merchant will have to manually process transactions and accept payment amount. Manually process of capturing funds can be done via Prestashop Admin as well as Merchant’s Mastercard Payment Gateway account login.

Below is list of all configuration options you will see under Hosted Session payment method for Mastercard Payment Gateway service Module:

Name Description
Enabled Two Options are available:
YES - to enable this payment method for Mastercard Payment Gateway Module
NO - to disable this payment method
Title Text mentioned here will be appear on front-end checkout page / payment method section
Payment Model Select any One option from below:
Purchase - Fund will be transferred to merchant account as soon as user’s entered card details has been successfully verified and order is placed.
Authorize & Capture - 2 stage process; where once order will place, it will only authorize user’s card details. Payment amount need to be captured manually by merchant.
3D Secure Two Options are available:
Disabled - After placing the order and entering card details have been verified, the order will be placed.
3DS - After the payer has entered their card details, they will be redirected to their bank's authentication service for verification using the 3DS 1.0 method.
EMV 3DS (3DS2) - After the payer has entered their card details, they will be redirected to their bank's authentication service for verification using the 3DS 2.0 method.

Back-office Operations

If Authorize & Capture payment method has been selected, then Funds need to be captured or refund manually.

To Capture Funds

Capture Payment is used for processing transaction and transfering funds into the merchant’s account.

  • Under Order detail page, when clicking on “Capture Payment” button it will process transactions and amount of order will be transferred to merchant's account.
  • After clicking on the “Capture Payment” button, the gateway will capture the tranaction and then you will see a success message. The order status will also change to “Payment Accept”.

Void Transaction

Void Transaction is used to cancel the order. By clicking on “Void Transaction” button, the order will be cancelled automatically and the amount of the order will be credited to user’s card (if payment has been captured).

Refund Payment

Once Payment has been captured by merchant using the Capture Payment option, the merchant may be later required to refund the payment.

  • Select Order for which payment has been captured and now amount needs to be refunded to user.

  • Goto that order detail page.

  • Check Mastercard Payment Action (Online) tab.

  • Here, Full Refund button will be find from where merchant can refund full amount captured for that order.

  • On clicking on Full Refund button, amount will be refunded to user.

  • To Restock ordered product, you will need to do process of creating Prestashop Refund on top of Mastercard Payment Gateway module refund process

Advanced Configurations

Below is the list of advanced configurations for the Mastercard Payment Gateway Service module.

Name Description
Logging Verbosity This module logs data into var/logs/mastercard.log - this switch control how much data is being logged,
Select any One option from below:
Errors Only - this is default option, which only logs when an error happens.
Everything - Logs everything related to error when it occurs (Like: API Response/status, errors, warning, etc).
Errors and Warning Only - Logs only errors and warnings when error occured.
Disabled - by selecting this, nothing will be logged when error will occured.
Gateway Order ID Prefix Default Option: Blank
In case one Merchant ID is used by multiple installation, then this field can be used to add a prefix to order id-s so that they will not conflict in the gateway.
Custom Webhook Endpoint Default Option: Blank
This field is mostly only used by development or with some complex web server rules, where the URL is not automatically detected correctly.

It is suggested to keep these fields with assigned default value. Please first consult with Technical team / Mastercard Payment Gateway Module support before changing these settings.

gateway-prestashop-module's People

Contributors

chirag-ontap avatar dangarner avatar ellenchristine avatar harshit-shah4512 avatar jk00000 avatar moderndude avatar ontapkristjan avatar riversy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.