Magento 2 PayFonte Integration

Table of Contents

1. Extension Installation

2. Get PayFont API Details

3. PayFonte Payment Integration Configuration

4. PayFonte Hosted Checkout on Frontend

5. Payment Details in the Backend Admin Section

 

1. Extension Installation

For Magento Marketplace Customers:

Find the extension’s Composer name and version in its composer.json file.

 

  • Login to your SSH and run:
    • composer require meetanshi/magento-2-payfonte-integration --ignore-platform-reqs
  • Enter your authentication keys. Your public key is your username; your private key is your password.
  • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
  • To verify that the extension is installed properly, run the command:
    • php bin/magento module:status Meetanshi_Payfonte
  • By default, the extension is probably disabled. Enable the extension and clear static view files:
    • php bin/magento module:enable Meetanshi_Payfonte --clear-static-content
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

For Meetanshi Customers:

  • Download the extension zip file and extract it to your Magento’s root directory.
  • Login to your SSH and run the below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

2. Get PayFont API Details

To integrate PayFonte with Magento 2, you’ll need the following API details from your PayFonte account:

  • Client ID
  • Client Secret
  • Gateway URL

To get these details, go to https://app.payfonte.com/login and log into your account. In the dashboard left-side menu, click Settings.

 

In the Settings, click API keys/Webhook to get the Client ID and Client Secret.
 

3. PayFonte Payment Integration Configuration

Log into your Magento 2 Admin Panel and navigate to Stores > Configuration.

In the left panel, under Sales, select Payment Methods and scroll down to PayFonte Hosted - Meetanshi. In the configuration section, you will find various settings to enable and configure the payment gateway:

 

  • Enabled: This option lets you activate or deactivate the PayFonte hosted checkout. Setting it to "YES" enables the payment gateway.
  • Title: Define the title that will appear on the checkout page for the PayFonte payment option.
  • Show PayFonte Logo: Enabling this option will show the PayFonte logo to customers at the checkout.
  • Sandbox Mode: This setting allows you to switch between live and sandbox environments. Use "YES" for testing purposes.
  • Client ID: Enter the Client ID from your PayFonte account.
  • Client Secret: Enter the Client Secret from your PayFonte account.

The Gateway URL will be populated automatically. You don’t need to change this.

 

You can also configure these additional options for the payments using the PayFonte payment method:

  • Allow Auto Invoice: Set YES to auto-generate invoices for the orders placed through PayFonte.
  • Payment from Applicable Countries: Select all or selected countries to allow payments using PayFonte Hosted Checkout.
  • Payment from Specific Countries: If you have set specific countries from the above option, select the countries to allow PayFonte payments.
  • Additional Information: Enter additional information to show on the checkout page at the front end.
  • Debug: Set YES to enable debug.
  • Sort Order: Enter the sort order of the PayFonte Hosted Checkout payment method.

4. PayFonte Hosted Checkout on Frontend

Once the payment method is configured, the PayFonte payment method is shown on the front end while checking out the products.

 

Just select the payment method, and click “Continue to Payment” to start payment using PayFonte.

 

On the PayFonte page, they can select the payment method, add payment details complete the payment.

Once the order is placed, the PayFonte payment details are shown in the Account dashboard, in the “My Orders” tab with transaction ID and reference ID.

5. Payment Details in the Backend Admin Section

Admins can also view payment details in the orders section of the Magento admin panel.