Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #6939 > unrolled thread

Experian Net Connect API -php

Started byvivek <vkapadnis@gmail.com>
First post2012-09-03 02:32 -0700
Last post2012-09-03 12:48 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.lang.php


Contents

  Experian Net Connect API -php vivek <vkapadnis@gmail.com> - 2012-09-03 02:32 -0700
    Re: Experian Net Connect API -php Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-03 09:07 -0400
      Re: Experian Net Connect API -php vivek <vkapadnis@gmail.com> - 2012-09-03 06:57 -0700
        Re: Experian Net Connect API -php Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-03 10:35 -0400
    Re: Experian Net Connect API -php ledgerDeMain <mail@me.not.invalid> - 2012-09-03 12:48 -0700

#6939 — Experian Net Connect API -php

Fromvivek <vkapadnis@gmail.com>
Date2012-09-03 02:32 -0700
SubjectExperian Net Connect API -php
Message-ID<be4e08bc-dffd-4745-9af2-bbdeb5c4bdf3@googlegroups.com>
Hi,
       i am trying to connect experian net connect api for credit profile details. i am developing this application in php. But i am getting "HTTP/1.1 303 See Other" Error.
Following is the curl code m executing,

<?php
$credit_profile	=	'<?xml version="1.0" encoding="UTF-8"?>
<NetConnectRequest xmlns="http://www.experian.com/NetConnect" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.experian.com/NetConnect NetConnect.xsd">
<EAI>Y1OJYOYX</EAI>
<DBHost>STAR</DBHost>
<ReferenceId></ReferenceId>
<Request xmlns="http://www.experian.com/WebDelivery" version="1.0">
<Products>
<CreditProfile>
<Subscriber>
<Preamble>TBD2</Preamble>
<OpInitials>TN</OpInitials>
<SubCode>1958497</SubCode>
</Subscriber>
<PrimaryApplicant>
<Name>
<Surname>Adams</Surname>
<First>Nora</First>
<Middle>C</Middle>
</Name>
<SSN>666868483</SSN>
<CurrentAddress>
<Street>604 Cypress St Apt B</Street>
<City>Newburgh</City>
<State>IN</State>
<Zip>47630</Zip>
</CurrentAddress>
<OutputType>
<XML>
<ARFVersion>07</ARFVersion>
<Demographics>Y</Demographics>
<Segment130>Y</Segment130>
<ScorePercentile>Y</ScorePercentile>
</XML>
</OutputType>
<Vendor>
<VendorNumber>FW2</VendorNumber>
</Vendor>
</CreditProfile>
</Products>
</Request>
</NetConnectRequest>';

$post_data	=	array('NETCONNECT_TRANSACTION'=> urlencode($credit_profile));

$username	=	'API Username';  // 
$password	=	'API Password';   // 
$user_pwd	=	 base64_encode($username.':'.$password);

//#2-Net Connect client receives ECALS response. This is the Net Connect URL.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.experian.com/lookupServlet1?lookupServiceName=AccessPoint&lookupServiceVersion=1.0&serviceName=NetConnectDemo&serviceVersion=2.0&responseType=text/plain');

curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT,60);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$ecals_url = curl_exec($ch);
$info1 		= curl_getinfo($ch);
curl_close($ch);

//#3-Net Connect client validates that the URL ends with “.experian.com”. If the URL is valid, the processing continues; otherwise, processing ends.

$host_name = parse_url( $ecals_url );
$host_name = explode(".", $host_name['host'] );
$host_name = $host_name[1].'.'.$host_name[2];

$ecals_url	=	trim($ecals_url);

if( $host_name == "experian.com" )
{
   
		$ch1 = curl_init(); 
		curl_setopt($ch1, CURLOPT_VERBOSE, TRUE);
		curl_setopt($ch1, CURLOPT_PORT, 443);
		curl_setopt($ch1, CURLOPT_URL,$ecals_url);  
		
		curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, TRUE);
		curl_setopt($ch1, CURLOPT_SSL_VERIFYHOST, 2);
		curl_setopt($ch1, CURLOPT_TIMEOUT, 10000); //times out after 10s 
		curl_setopt($ch1, CURLE_SSL_CONNECT_ERROR, 1);
		curl_setopt($ch1, CURLOPT_HEADER, 1);
		curl_setopt($ch1, CURLOPT_RETURNTRANSFER,TRUE); 
		
		curl_setopt($ch1, CURLOPT_POST,1);
		curl_setopt($ch1, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
		curl_setopt($ch1, CURLOPT_USERPWD,$user_pwd); 
		curl_setopt($ch1, CURLOPT_POSTFIELDS, $post_data);
		curl_setopt($ch1, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded',"Content-length: ".strlen($credit_profile) ));
		
		$result2 		= 	curl_exec ($ch1);   
		$info 			= 	curl_getinfo($ch1);
		
		if ( curl_errno($ch1) ) {
			$result = 'ERROR -> ' . curl_errno($ch1) . ': ' . curl_error($ch1);
		} 
		else {
			$returnCode = (int)curl_getinfo($ch1, CURLINFO_HTTP_CODE);
			
			switch($returnCode){
				case 200:
					$result = 'ReponseCode ' . $returnCode; 
					break;
				case 302:
					$result = 'ReponseCode ' . $returnCode; 
					break;
				case 404:
					$result = 'ReponseCode ' . $returnCode; 
					break;		
				default:
					$result = 'HTTP ERROR -> ' . $returnCode;
					break;
			}
		}
		  echo curl_error($ch1);
		curl_close($ch1);
	
} // Ends If	

?>


Please Advise.

[toc] | [next] | [standalone]


#6940

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-09-03 09:07 -0400
Message-ID<k22a30$v9c$1@dont-email.me>
In reply to#6939
On 9/3/2012 5:32 AM, vivek wrote:
> Hi,
>         i am trying to connect experian net connect api for credit profile details. i am developing this application in php. But i am getting "HTTP/1.1 303 See Other" Error.
> Following is the curl code m executing,
>
<120+ LOC snipped>
>
> Please Advise.
>

Did you try asking experian?  They know more about their system than 
anyone here.

And BTW - 303 is not an error.  It's a redirect.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6941

Fromvivek <vkapadnis@gmail.com>
Date2012-09-03 06:57 -0700
Message-ID<19803974-ced0-430d-b61c-3dd614fd34b9@googlegroups.com>
In reply to#6940
On Monday, September 3, 2012 6:37:58 PM UTC+5:30, Jerry Stuckle wrote:
> On 9/3/2012 5:32 AM, vivek wrote:
> 
> > Hi,
> 
> >         i am trying to connect experian net connect api for credit profile details. i am developing this application in php. But i am getting "HTTP/1.1 303 See Other" Error.
> 
> > Following is the curl code m executing,
> 
> >
> 
> <120+ LOC snipped>
> 
> >
> 
> > Please Advise.
> 
> >
> 
> 
> 
> Did you try asking experian?  They know more about their system than 
> 
> anyone here.
> 
> 
> 
> And BTW - 303 is not an error.  It's a redirect.
> 
> 
> 
> -- 
> 
> ==================
> 
> Remove the "x" from my email address
> 
> Jerry Stuckle
> 
> JDS Computer Training Corp.
> 
> jstucklex@attglobal.net
> 
> ==================

Jerry,

Thanks for the reply.
I had already raised this issue to their support, but i didn't got any satisfactory answer. please let me know if any more information at your end.

thanks,
vivek
  

[toc] | [prev] | [next] | [standalone]


#6942

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-09-03 10:35 -0400
Message-ID<k22f82$j9$1@dont-email.me>
In reply to#6941
On 9/3/2012 9:57 AM, vivek wrote:
> On Monday, September 3, 2012 6:37:58 PM UTC+5:30, Jerry Stuckle wrote:
>> On 9/3/2012 5:32 AM, vivek wrote:
>>
>>> Hi,
>>
>>>          i am trying to connect experian net connect api for credit profile details. i am developing this application in php. But i am getting "HTTP/1.1 303 See Other" Error.
>>
>>> Following is the curl code m executing,
>>
>>>
>>
>> <120+ LOC snipped>
>>
>>>
>>
>>> Please Advise.
>>
>>>
>>
>>
>>
>> Did you try asking experian?  They know more about their system than
>>
>> anyone here.
>>
>>
>>
>> And BTW - 303 is not an error.  It's a redirect.
>>
>>
>>
>> --
>>
>> ==================
>>
>> Remove the "x" from my email address
>>
>> Jerry Stuckle
>>
>> JDS Computer Training Corp.
>>
>> jstucklex@attglobal.net
>>
>> ==================
>
> Jerry,
>
> Thanks for the reply.
> I had already raised this issue to their support, but i didn't got any satisfactory answer. please let me know if any more information at your end.
>
> thanks,
> vivek
>
>

People here are not experts in accessing experian - in fact I'd be 
surprised if anyone here has tried it. And no one is going to go through 
120+ LOC for free to try to figure out what is wrong.  We are, after 
all, all volunteers.

If you can't get help from experian, I would suggest you hire a 
consultant (and no, I'm not interested).

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6943

FromledgerDeMain <mail@me.not.invalid>
Date2012-09-03 12:48 -0700
Message-ID<qm1a48lmd7c256dlorissbqa2ra3rp5ao5@4ax.com>
In reply to#6939
 On Mon, 3 Sep 2012 02:32:31 -0700 (PDT)
 in news:comp.lang.php
 article <be4e08bc-dffd-4745-9af2-bbdeb5c4bdf3@googlegroups.com>
 vivek <vkapadnis@gmail.com>
 wrote:

>Hi,
>       i am trying to connect experian net connect api for credit profile details. i am developing this application in php. But i am getting "HTTP/1.1 303 See Other" Error.
>Following is the curl code m executing,
>
No experience with experian but I suspect you'll be needing to use
CURLOPT_FOLLOWLOCATION
<http://www.php.net/manual/en/function.curl-setopt.php>

-- 
ledgerDeMain

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web