Re: Using cURL to POST to a Payment Gateway and get back results
| From: | olinux | Date: | Wed, 09 Apr 2003 18:03:39 +0000 |
| Subject: | Re: Using cURL to POST to a Payment Gateway and get back results | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19376@lists.php.net to get a copy of this message | ||
Try one of these:
http://zend.com/codex.php?id=619&single=1
http://zend.com/codex.php?id=633&single=1
olinux
--- Matt Babineau <matt@criticalcode.com> wrote:
> Hi All-
>
> Here is my problem. I am posting to a payment
> gateway using cURL, and
> pulling back the results. unfortunately, the results
> are in HTML!!!
>
> I have used preg_match_all to get all the <INPUT>
> tags in the HTML
>
> preg_match_all('/<INPUT(.*?)>/s',$result,$out);
>
> for ($i=0; $i< count($out[1]); $i++) {
> echo $out[1][$i]."<BR>";
> }
>
>
> I am a RegExp newbie as you can probably see above.
> I the expression on a
> php website and it seemed to fit the purpose. So I
> have all the INPUT tags
> in an array now, and I want to search the array for
> specifically, the input
> tag of "status" so I can find the "APPROVED" value.
>
> I'm not sure if I am going about this the right way
> but apparently
> array_search can't handle searching when the needle
> is a double quote.
>
> if (array_search("type=\"hidden\" name=\"status\"",
> $out[1])) {
> echo "<br><b>Found Value</b><br>";
> } else {
> echo "<br><b>NO Value</b><br>";
> }
>
> I'd like to be able to see if the transaction was
> approved or declined and
> then go from there. Any suggestions on how I should
> be going about this
> process?
>
> Thanks Group!!
>
> Matt Babineau
> criticalcode.com
> e:: <mailto:matt@criticalcode.com>
> matt@criticalcode.com p:: 603.943.4237
>
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com