>>//My responses are delimited with | (pipe)
>>$parts = explode("|", $resp); //creates array from reponse

>Where are you setting this?

How I set up at Authorize.net didn't expect yours to be...
one of these should work to import the file

The following options expect a file descriptor that is obtained by using the
fopen() function:
CURLOPT_FILE: The file where the output of your transfer should be placed,
the default is STDOUT.
CURLOPT_INFILE: The file where the input of your transfer comes from.
as in:
  curl_setopt($ch, CURLOPT_INFILE, fileName.XML);


----- Original Message -----
From: "Steve Keller" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 5:49 PM
Subject: Re: [PHP] No Reply From cURL

> At 11/21/2002 03:18 PM, Bret L Conard wrote:
> Really appreciate the help Bret. But I've still got some problems:
> >(FYI - I am using authorize.net, so some of the response parameters may
> >different for you)
> Actually, I appreciate the fields demonstration because it made me realize
> I was missing two fields from the post, although Netledger is our
> accounting system, not the payment gateway, so I was able to dump the CC
> and eCHECK junk from the code since that's already been processed and
> written into the data file.
> We're using PayflowPro, and I've set up their Silent Post to feed to a
> script on our site that generates an XML file in NetLedger's "Small
> Business XML" format based on the data returned by PayFlow, and only if
> purchase is approved. It's that XML file that I need to post, along with
> two identifying fields. NetLedger is then supposed to take that uploaded
> XML file and turn it into a sales record in our accounting.
> Does anyone know how to work a file into a cURL post?
> I've already tested the XML file numerous times (NetLedger has a way to
> upload the XML files from your desktop), and I know it's formatted
> >$ch = curl_init("https://secure.website.net/script_or_application";); //
> Ok, I was setting the URL in a CURLOPT. From what I understand, that
> shouldn't make a difference, right?
> >//My responses are delimited with | (pipe)
> >$parts = explode("|", $resp); //creates array from reponse
> Where are you setting this?
> Ok, I've taken a shot at using your example and just removing the CC
> What I came up with, then, should work, right? Nope. Still no response.
> Here's my code:
>          $data = "mtype=XMLDOC&outfile=true";
>          $ch = curl_init("https://partners.netledger.com/SmbXml";);
>          curl_setopt($ch, CURLOPT_HEADER, 0);
>          curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
>          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>          $resp = curl_exec($ch);
>          curl_close ($ch);
>          $parts = explode("|", $resp);
>          echo "resp: ".$resp."<br />";
>          echo "parts: ".$parts."<br />";
>          foreach($parts as $key => $val) {
>             echo "<b>$key:</b> $val <br>\n";
>          }
> Now, granted, I'm not using "|" as a delimiter. At least, I don't think I
> am. Still, $resp should echo if there's something in it, right? What I get
> out of that is:
> resp:
> parts: Array
> 0:
> Parts is the only one that echoes as I expected it to.
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Web: www.healthtvchannel.org
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to