Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,634 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,051 people online right now. Registration is fast and FREE... Join Now!




Payflow Pro

 
Reply to this topicStart new topic

Payflow Pro, What's best for Windows?

richowe
post 15 May, 2004 - 04:11 PM
Post #1


D.I.C Head

**
Joined: 15 May, 2004
Posts: 62

As I understand it, pfpro_init()...etc is not available for windows format.

Wish PHP would port a module for windows, it would be cake to add ecommerce connectivity to my apps.

Anyone know of a simple installation to incorporate PHP with either Verisign or authorize.net?

Any suggestions would be appreceiated.
User is offlineProfile CardPM

Go to the top of the page

cyberscribe
post 15 May, 2004 - 06:02 PM
Post #2


humble.genius

Group Icon
Joined: 5 May, 2002
Posts: 1,062



Thanked 2 times

Dream Kudos: 154
My Contributions


OSCommerce does this.

This looks promising:

http://atomized.org/PEAR/Payment/

but it ain't all there yet.

Let me know if you find a solution that doesn't involve repurposing OSC code.
User is offlineProfile CardPM

Go to the top of the page

richowe
post 18 May, 2004 - 10:30 AM
Post #3


D.I.C Head

**
Joined: 15 May, 2004
Posts: 62

Is it possible to just use the payment gateways from osCommerce instead of using the entire application/UI?

I can write my own shopping cart, I just need easy connectivity to a pyament gateway through PHP if possible.
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 18 May, 2004 - 10:48 AM
Post #4


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,846



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


Most payment gateways provide code to interact with their API. It's usually just a simple passing of http headers or actually sending variables to a page on their site and passing a return URL.
User is offlineProfile CardPM

Go to the top of the page

richowe
post 25 May, 2004 - 03:40 PM
Post #5


D.I.C Head

**
Joined: 15 May, 2004
Posts: 62

I FOUND IT!!!!

Here's the code for all the other Windows 2000/2003 developers that need PHP support for Verisign's PayFlow Pro!

Make sure to download the Win32 SDK from the verisign manager site and install the COM component. Instructions are included in the download. Piece of cake really.

Then use the following code with PHP's support of COM to create a custom connection to Verisign's PayFlowPro. This will give you 100% control over look and feel issues and give a professional appearance.

Make sure to change the info in the connection to use your unique login for Verisign:

Although PHP is not officially supported at this time by VeriSign, it is possible to use PHP in conjunction with the COM client. Assuming the COM client has been successfully installed, the following code can be used as an example:


------------ BEGIN CODE SNIPPET ---------------


<?php

$objCOM = new COM("PFProCOMControl.PFProCOMControl.1");

$parmList = "TRXTYPE=S&TENDER=C&ZIP=12345&COMMENT2=PHP/COM Test Transaction";
$parmList .= "&ACCT=" . $_POST["cardNum"];
$parmList .= "&PWD=" . $_POST["userPW"];
$parmList .= "&USER=" . $_POST["userId"];
$parmList .= "&VENDOR=" . $_POST["vendorId"];
$parmList .= "&PARTNER=" . $_POST["partnerId"];
$parmList .= "&EXPDATE=" . $_POST["cardExp"];
$parmList .= "&AMT=" . $_POST["amount"];

$ctx1 = $objCOM->CreateContext("test-payflow.verisign.com", 443, 30, "", 0, "", "");
$result = $objCOM->SubmitTransaction($ctx1, $parmList, strlen($parmList));
$objCOM->DestroyContext($ctx1);

$valArray = explode('&', $result);
foreach($valArray as $val)
{
$valArray2 = explode('=', $val);
$response[$valArray2[0]] = $valArray2[1];
}

if ($response['RESULT'] == 0)
{
echo "<b>Success!</b><br><br>";

// or create a header call to success page encoding any params for display.

}
else
{
echo "<b>Failure!</b><br><br>";
}

foreach($response as $name => $value)
{
echo "<b>$name</b> = $value<br>";
}
?>

------------ END CODE SNIPPET ---------------
User is offlineProfile CardPM

Go to the top of the page

richowe
post 25 May, 2004 - 08:53 PM
Post #6


D.I.C Head

**
Joined: 15 May, 2004
Posts: 62

This is soooo bad ass!

Make sure you make all directories to the certs path have read/write access as Administrator or you will get a -31 response error like I did.

Permissions issues in Windows *shudder*
User is offlineProfile CardPM

Go to the top of the page

pinchenet
post 26 Mar, 2005 - 05:41 AM
Post #7


New D.I.C Head

*
Joined: 26 Mar, 2005
Posts: 1

What do you mean by making all directories to the certs path have read/write access as Administrator? I've had the same problem as you for a while but I don't know what you mean by giving permissions to the certs path.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 04:05AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month