Magento eCommerce Tips Archives

You have an online shop, a merchant account with First Data and just need the right payment module to integrate First Data Global Gateway into your shop – that’s it your ready to go online!

Wait a minute – you see First Data Global Gateway Virtual Terminal, First Data Global Gateway e4 Hosted Payment Page and First Data Global Gateway e4 Web-services modules. What is the difference? Which one to choose?

First Data Global Gateway Virtual Terminal (previously known as LinkPoint), is one of the oldest and the most reliable merchant services to process payments online. When you register for a First Data Global Gateway Virtual Terminal account you will get a PEM file which is a security file that helps your website talk to the First Data server.

Recently, First Data has launched a new payment solution called First Data Global Gateway e4 which has both hosted payment pages and a web services methods. First Data strongly recommends the use of First Data Global Gateway e4 over First Data Global Gateway Virtual Terminal. Login into your First Data account and go to Support > Download Center. If, you see a link to download your PEM file then, you have a FDGG Virtual Terminal account. Click here to learn more about setting up your FDGG Virtual Terminal module.

Then, what is First Data Global Gateway e4 Hosted Payment Pages & Web-services API?
FDGG e4 Hosted Payment Pages protects the user from handling sensitive customer payment data by hosting the payment pages and forms on their servers. The flow in this method will redirect the buyer from the users site to the First Data server to enter their payment details and complete the payment. Once the payment is successful the buyer is redirected back to the users site with the payment details. This method not only protects the user but, also reduces the steps for PCI compliance.

FDGG e4 Web-services API on the other hand allows users to provide a seamless process for their buyers by processing the payment directly on their website without any redirection. In this method the buyer will remain on the shop – the user will collect the payment data via their website and send it to First Data through web-service calls and get the response. This method the payment information passes through the merchants shop server.

So if, you are a new customer of First Data then most probably you will have the First Data Global Gateway e4 account. Or if, you are an existing user and have not heard about a PEM file or your bank (like Bank of America) says that you do not have a PEM file then you are a First Data Global Gateway e4 account holder.

Incoming search terms:

  • unable to use client certificate (no key found) or wrong pass phrase
  • fdgg e4
  • unable to use client certificate (no key found or wrong pass phrase
  • magento ios
  • how is global gateway virtual terminal and global gateway e4 different
  • global payments e4
  • first data global gateway e4 cancellation fee
  • first data e4 global gateway api php example
  • e4 vs linkpoint
  • difference between payment gateway e4 and virtual terminal

FirstData (previously known as LinkPoint) is currently one of the most popular payment gateways on the internet; with small to enterprise business trusting it to process transactions.
Schogini has been working with FirstData for over 10 years now both as a merchant and as a developer.
Our FirstData payment modules are currently being used in over 2000 shops world wide – Magento, OpenCart and PrestaShop.
Based on our experience these are some of the common issues or questions that FirstData payment gateway users have:

  1. What is all the fuss about PEM!?
    A PEM file is unique digital file which FirstData issues to each merchant.Every time your shop tries to talk to FirstData servers, FirstData will first check the validity of the PEM file.If, its not valid or corrupted or cannot be read by FirstData (that is wrong file permissions) then all further processing with stop and FirstData will return an error like this:”Error: unable to use client certificate (no key found or wrong pass phrase?)”You can download your PEM file by logging into your FirstData account > Support > Download Center.

    If, you do not see it there then, raise a support ticket with FirstData and they will get you in.

    These 3 points are basic & quick ways to check the validity of your PEM file. Open the PEM file and check:

    • It should have at least 30 to 31 lines
    • It should have 2 sections Private Key and Certificate
    • The PEM file format should look somethings like this:
      —–BEGIN RSA PRIVATE KEY—–
      ……….
      ……….
      —–END RSA PRIVATE KEY—–
      —–BEGIN CERTIFICATE—–
      ……….
      ……….
      —–END CERTIFICATE—–

    If your PEM file fails any of these points then, it is most probably corrupted and you will need to download it again.

  2. The difference between Live & Test modes?
    It is always advisable to test the payment gateway in TEST mode before going LIVE.For FirstData, test and live accounts are 2 separate accounts and hence there are 2 separate PEM files!You need you register separately for a test account, login into the test account and download the test PEM file – just like you would do for a live account.You can register for a FirstData test account here:https://www.firstdata.com/gg/apply_test_account.htm

    REMEMBER: If you use a LIVE pem file in test mode or the other way round then, you will get the error:

    “Error: unable to use client certificate (no key found or wrong pass phrase?)”

    Yes, this is the same error that you get when FirstData cannot intepret your PEM file – and it is correct since the live and test servers are different and hence, they cannot understand each others PEM files!

  3. The port 1129 mystery.
    For security and convenience, FirstData communicates with your shop ONLY through port 1129 of your web server.On most hosts, this port is closed since, this is not a common port for communication.If, port 1129 on your server is closed then, FirstData will not be able to talk to your shop at all and you will see an error like this:”Error saying: couldn’t connect to host.”Ask your host to open port 1129 for outbound traffic. They should be able to handle it.

    If, your hosts says that they can open the port only for a specific IP then, request them to open outbound traffic on port 1129 for secure.linkpt.net.

  4. FirstData vs. LinkPoint.
    LinkPoint is now called FirstData Global Gateway. This basically means that your LinkPoint account should work absolutely fine with FirstData!

Summarizing, to use FirstData on your shop you will need 3 things:

  1. A merchant account with FirstData. You will get a store ID when you register. Remember it.
  2. PEM file. This is a unique digital file that FirstData assigns to you to identify you securely.
  3. Port 1129 open for outbound traffic on your web server

You can get more information on FirstData’s online payment solutions here:

http://www.firstdata.com/en_us/products/merchants/online-and-telephone-payments.html

Hope this has helped clear some of the doubt clouds around FirstData payment gateway.

If, you are Schogini payment module user then, this FAQ is more specific to the module and should definitely guide you better: http://schogini.biz/firstdata-linkpoint-faq

If, you need to purchase the FirstData Payment Module you can go to http://schogini.biz

Incoming search terms:

  • global gateway e4 unable to process with payment
  • linkpoint for magento
  • no key found or wrong pass phrase

If, you a Magento developer you definitely know that Magento debugging is something of an art in itself.

This edit is for developers who need to see the Magento errors directly on their browser (developer mode)

versions before 1.4
In the Magento root folder index.php uncomment the line (around line #60):
#Mage::setIsDeveloperMode(true);

versions after 1.4
Open the .htaccess file in the Magento root folder and add a line like this to the end of the file:
SetEnv MAGE_IS_DEVELOPER_MODE “”

NOTE: If, you want to enable PHP error reporting too then, open index.php in the Magento root folder and uncomment the line (around line #70):
#ini_set(‘display_errors’, 1);

What does the .htaccess line do?

The .htaccess line that you add will create a server environment variable MAGE_IS_DEVELOPER_MODE which you can set when you want to enable developer mode. Hence, you do no need to have 2 versions of index.php for staging and live shop.

When you do not want developer mode just delete this line from the .htaccess file!

This statement in index.php will give you a better explanation:

<pre  class=”  brush:c”>

Incoming search terms:

  • enable magento error reporting index php
  • error reporting in htaccess enabled magento
  • magento error reporting
  • magento error reporting turn on

Magento XML errors

You see an XML error either on your screen or in your system.log but, you do not know which XML file has caused it? These tips should help you get started:

  • Edit this file on line 432
    [magento root]/app/code/core/Mage/Core/Model/Layout/Update.php
    add this code:
  • Edit this file on line 515
    [magento root]/lib/Varien/Simplexml/Config.php
  • Clear the Magento cache and reload the page you are working on
  • Now check your /var/lib/system.log file – you should see the XML filename or the XML string that is causing the error.

Additional Help:
As you must have guessed from the file names of the above files:

  • If the error is from this file:
    [magento root]/lib/Varien/Simplexml/Config.php on line 510
    then it, means there is an error in one of your module config files. Check one of these config.xml files:

    • [magento root]/app/etc/modules/config.xml
    • [module path]/etc/config.xml
  • If the error is from this file:
    [magento root]/app/code/core/Mage/Core/Model/Layout/Update.php on line 431
    then, there is an error in your theme layout XML file.

Hope, this helps you debug faster.

How to add log in your OpenCart Module

If, you want to add ‘logging’ feature to your module, include the global $log object like this

This you can do in both the catalog and admin sections.
The logged message can be seen in the [opencart path]/systems/log/error.txt file

Its good to also note that all PHP related messages generated in OpenCart are also logged in this file.

Incoming search terms:

  • opencart logging
  • insert error log opencart
  • opencart log
  • opencart log file
  • opencart write log
  • opencart wtite debug log

As of 1.4.2 it is deprecated to define order statues and states via config.xml. Then, how will you get more order statuses in the admin order details page?

Consider for example you have an order in ‘Pending Payment’ state and you want to change it to ‘Processing’. If, you go to the order details page in the admin you will find only one option in the order status drop down (which is ‘Pending Payment’ itself!)
What if you want to show ‘Processing’ too in the drop down?
You will need to make changes in the Magento sales_order_status_state table like this:

[EDIT] Just for your info:
Before 1.4.2 you would need to override the Mage/Sales/etc/config.xml file and modify the <global><sales><order><states> section to look like this:

How to add static blocks to a CMS page

You have created a static block and now you want to add it to your CMS page.
You can do it in 2 ways. Assume you have created a block called sch_myblock:

1. CMS Page “Content” tab:
// In the CMS page “content” you can include a custom static block like this

2. CMS Page “Design” tab:
// In the “Page layout” section you can add a custom block like this

How to change Magento admin url

By default Magento Admin Url is:
http://[your magento shop]/admin

But, what if you do not want to use admin in the URL? For example, you want your admin URL to look like this:
http://[your magento shop]/shopadmin

If, you check your files via FTP you will not see a folder called admin. So, how do you do it?
Open app/etc/local.xml – you will find a section like this:

The name that you enter in the “frontend” tag is the name that will be used to view the admin.
In this example, the Magento admin URL will be
http://[the magento shop]/mybiz

How to change the base url in Magento

If you need to change the Magento {{base_url}} manually (hopefully, you have a very good reason to do this) – all you need to do is edit 2 rows in the core_config_data table:

#1 path: web/unsecure/base_url and
#2 path: web/secure/base_url

That’s it! Don’t forget to clear the cache (deleting var/cache should help)

Assuming you know how to create a custom module, consider a case where you need to create a URL for your module. Follow these steps:

In your module’s config.xml file:

Create a controller file TestController.php in your module’s controller folder like this (as you may have guessed, my modules name is Schogini):

This is what happens when you browse this URL
http://mymagentostore.com/schurl/test/showmsg/

  • schurl tells that the controller to check is Mage_Schogini (the name that is specified in the config file in the section: args > module)
  • test tells that controllers/TestController.php file must be checked
  • showmsg tells that showmsgAction() method must be called.

Hence, it will look for the method showmsg() inside the Mage_Schogini_TestController class

Page 1 of 512345