CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • First Data Processing
Pages: [1] 2

Author Topic: First Data Processing  (Read 5856 times)

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
First Data Processing
February 03, 2011, 12:22:52 pm
I cannot get first data processor to work on my site, I have the .pem file in an appropriate folder on the site, I have pointed to it in every way I can but I keep getting this error
Code: [Select]
  Payment Processor Error message
: 60:Curl error - unable to use client certificate (no key found or wrong pass phrase?) Try this link for more information http://curl.haxx.se/docs/sslcerts.html

this has nothing to do with the security certificate on the server, but rather with the .pem file associated with the first data account.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 03, 2011, 02:11:07 pm
Are you on a windows server?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 03, 2011, 02:57:04 pm
I am not, standard LAMP setup with cpanel.

B.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 03, 2011, 03:13:03 pm
& the path to the certificate is correct & properly accessible by the web server account? It' not outside the webroot somewhere it can't get to or inconsiderately permissioned?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 03, 2011, 03:26:15 pm
yes the .pem file is in the same folder as the templates_c stuff, I have tried

/home/site/public_html/civic/sites/all/civic_custom/cert
/public_html/civic/sites/all/civic_custom/cert
public_html/civic/sites/all/civic_custom/cert
home/site/public_html/civic/sites/all/civic_custom/cert
/home/site/public_html/civic/sites/all/civic_custom/cert/
/public_html/civic/sites/all/civic_custom/cert/
public_html/civic/sites/all/civic_custom/cert/
home/site/public_html/civic/sites/all/civic_custom/cert/


and I have tried moving the .pem to different folders.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 03, 2011, 03:35:07 pm
The code for this is very simple so it's something server-ish - I note CURL must be compiled with SSL which I assume it is  ?   

   $key  = $this->_paymentProcessor['password']; # Name and location of certificate file
 

       curl_setopt( $ch, CURLOPT_POST, 1 );
        curl_setopt( $ch, CURLOPT_POSTFIELDS, $requestxml );
        curl_setopt( $ch, CURLOPT_SSLCERT, $key );
        curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
        curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );  // see - http://curl.haxx.se/docs/sslcerts.html
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );  // return the result on success, FALSE on failure
        curl_setopt( $ch, CURLOPT_TIMEOUT, 36000 );                                     
        curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );  // ensures any Location headers are followed
      
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 03, 2011, 09:00:01 pm
Both SSL and CURL are compiled, and the standard ssl cert is working just fine (https://sitename, is working)...

Is there something I am missing about the .pem file?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 03, 2011, 10:18:42 pm
well - maybe if you ask first data? It seems CURL can't open or interpret the pem for some reason but ....
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 03, 2011, 10:34:29 pm
I tried calling First Data today, they seem to think it's somethig on my server side... I am at a loss.

B.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 03, 2011, 10:52:13 pm
THe only clues I get from uncle google are to try running curl from the command line to help debug & upload the pem in ascii format & execute permissions (I think write on the directory too)

Quote
You are receiving this error becuase you have the wrong path for the PEM file. Also make sure you upload the PEM file in ASCII format for UNIX servers.
On a UNIX server the path for the PEM file should look something like this:
$myorder["keyfile"] = "/home/htdocs/www/linkpoint/123456.pem";


http://sgserror.com/api/api_errors.php#cert
http://www.phpfreaks.com/forums/php-coding-help/%28solved%29-curl-ssl-cert-%28-key-file-wrong-pass-phrase-incorrect-%29/
http://curl.haxx.se/mail/lib-2007-03/0049.html
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 04, 2011, 09:29:01 am
Ok, so it looks like I need to put the entire pem path including file name

/home/name/public_html/civic/cert/#########.pem

but now I'm getting a different error
Code: [Select]
Payment Processor Error message
: 9009:Error: [] - from payment processor



Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 04, 2011, 10:42:29 am
yay progress!
It looks like First Data spits out some info to your civi log - in sites/default/files/civicrm/templates_C/en_US/configandLog or similar

Or you could debug more agressively - ie put

        echo "<pre>";
        print_r($responseData);
        die;

around line 283 of civicrm/CRM/Core/Payment/Firstdata.php
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 04, 2011, 12:09:30 pm
Code: [Select]
Not Found


The requested URL /:1129/LSGSXML was not found on this server.

looks to me like we are missing a domain name somewhere.

B.

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: First Data Processing
February 04, 2011, 12:15:13 pm
forgive me, but I am not that good at debugging the coding...

Looks to me like there is probably something wrong in here
Code: [Select]
/**********************************************************
         * define variables for connecting with the gateway
         **********************************************************/
       
        $key  = $this->_paymentProcessor['password']; # Name and location of certificate file
        $requestFields["configfile"] = $this->_paymentProcessor['user_name'];      # Your store number
        $port = "1129";
        $host = $this->_paymentProcessor['url_site'].":".$port."/LSGSXML";
That's from /civicrm/CRM/Core/Payment/FirstData.php

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: First Data Processing
February 04, 2011, 12:43:20 pm
is your site url set properly under site url in your payment processor settings? is it set in the db?

https://secure.linkpt.net
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • First Data Processing

This forum was archived on 2017-11-26.