Coder Social home page Coder Social logo

test-plugin's Introduction

PayFabric Gateway Plugin for Magento 2.3 or Higher

Requires Magento version 2.3 or higher.

Requires an active PayFabric account. Development can be done on a PayFabric Sandbox account. PayFabric is an EVO Payments processing platform.

Description

PayFabric gateway extension allows you to add PayFabric payment processing capabilities into Magento 2.3 or higher without any custom coding.

Display Modes

The plugin offers three modes to present the Hosted Payment Page:

  • Dialog
  • Iframe
  • Redirect

Alternative Payment Methods

Alternative Payment Methods supported by each display mode:

Payment Method Dialog Iframe Redirect
Apple Pay
Google Pay
PayPal/Venmo

Installation

Before installing please take a full backup of your website.

Manual Installation

  1. Download the extension zip file.
  2. Unzip the extension and upload the PayFabric folder to your Magento root directory app/code (create folder if not exists) via FTP/SSH.
  3. Enable the extension and clear the static view files by running the command:
    bin/magento module:enable PayFabric_Payment --clear-static-content
    
  4. Register the extension and initiate the database migrations by running the command:
    bin/magento setup:upgrade
    
  5. Recompile the Magento project by running the command:
    bin/magento setup:di:compile
    
  6. Clear the Magento store’s cache by running the command:
    bin/magento cache:flush
    

Install with Composer

  1. Run from Magento root folder:
    composer require payfabric/module-payment
    
  2. Enable the extension and clear the static view files by running the command:
    bin/magento module:enable PayFabric_Payment --clear-static-content
    
  3. Register the extension and initiate the database migrations by running the command:
    bin/magento setup:upgrade
    
  4. Recompile the Magento project by running the command:
    bin/magento setup:di:compile
    
  5. Clear the Magento store’s cache by running the command:
    bin/magento cache:flush
    

Configuration

In the PayFabric Portal, prepare a device with a default gateway configured.

  1. Go to Settings > Dev Central > Device Management to create a device to obtain the Device ID and Password.
  2. Go to Settings > Gateway Account Configuration, click '+ New Gateway Account' if the payment gateway account is not associated to an existing PayFabric account, and then set the default gateway under Default Gateway Settings. Please refer to the user guide in PayFabric.
  3. If you enable the eCheck Gateway Account, you can customize the eCheck payment UI to default the Entry Class to ‘WEB’ and hide it by adding the following custom JS in the PayFabric theme (please refer to PayFabric Themes):
    $(function(){
        $(".entryClassDiv").hide();
        $("#EntryClass option").each(function(){if(this.value == 'WEB') this.selected = true; else this.selected = false;});
    });

In your Magento account:

  • Go to STORES > Configuration > Sales > Payment Methods to enter your gateway and device data. image
  • Select your Display Mode. When using "Iframe" as your Display Mode, you must create a theme to add the following custom JS and configure this theme as default theme in the PayFabric Portal (please refer to PayFabric Themes). Please don't do that for other display modes which will affect your payment UI.
    $(".BillingContent").hide();
    $("#payButton").hide();
    typeof (receiveMessage) !== "undefined" && window.removeEventListener("message", receiveMessage, false);
    var receiveMessage = function (event) {
        var data = event.data;
        if (data.match("^\\{(.+:.+,*){1,}\\}$"))  data = $.parseJSON(data);
        if (data.action == 'pay') {
            typeof (data.BillCountryCode) !== "undefined" && $("#BillCountryCode").val($("#BillCountryCode").find("option[value^=" + data.BillCountryCode + "]").val()).trigger('change');
            typeof (data.BillAddressLine1) !== "undefined" && $("#BillAddressLine1").val(data.BillAddressLine1);
            typeof (data.BillAddressLine2) !== "undefined" && $("#BillAddressLine2").val(data.BillAddressLine2);
            typeof (data.BillCityCode) !== "undefined" && $("#BillCityCode").val(data.BillCityCode);
            typeof (data.BillStateCode) !== "undefined" && $(".state").val($("#BillStateCode").find("option[value^=" + data.BillStateCode + "]").val() || data.BillStateCode);
            typeof (data.BillZipCode) !== "undefined" && $("#BillZipCode").val(data.BillZipCode);
            $("#payButton").click();
        }
    }
    window.addEventListener("message", receiveMessage, false);
  • Next, select your Payment Action. Select "Sale" for a normal website purchase transaction. This is the default option and automatically executes both the authorization and capture for the transaction. The funds from this transaction will be included in your next batch settlement.
    • If you choose "Authorization", see the Capture instructions below.
  • Click "Save Config".
  • Go to System > Cache Management to flush Magento cache. image
  • When using "Authorization" as your Payment Action, you must “Capture” the transaction when the sale has been completed. If you do not “Capture” the Authorization, no funds will be settled as the transaction is not complete.
    • To capture an authorized transaction: Click on the "Invoice" button at the top right side. image
    • On the Invoice page, scroll down to the bottom, choose "Capture Online" from the dropdown menu, and click on the "Submit Invoice" button. image
    • When using "Authorization" as your Payment Action, you may “Void” a transaction when the order has been cancelled before being captured. Click on the "Void" or "Cancel" button at the top right side. image
  • To refund a sale or captured transaction directly on Magento: Open the invoice of the captured order. image
    • Then click on "Credit Memo" on the top right side menu. image
    • On the credit memo page, click "Refund". image

Support

Have a question or need help? Contact [email protected]

test-plugin's People

Contributors

jackzhang-nodus avatar navarr avatar nickdadar avatar nikkipnguyen avatar shaunsharples 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.