<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Noemi Millman &#124; Triopter &#187; php</title>
	<atom:link href="http://triopter.com/archive/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://triopter.com</link>
	<description>Hello.  My name is Noemi Millman, and Triopter is my web development agency.  We handcraft beautiful, dynamic websites.</description>
	<lastBuildDate>Fri, 06 Aug 2010 16:32:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introducing Usertrack: Drupal Module to Track User Login / Logout Status</title>
		<link>http://triopter.com/archive/introducing-usertrack-drupal-module-to-track-user-login-logout-status/</link>
		<comments>http://triopter.com/archive/introducing-usertrack-drupal-module-to-track-user-login-logout-status/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 20:40:00 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://triopter.com/?p=189</guid>
		<description><![CDATA[As part of a recent project for the excellent Nolej Studios, I needed a way to track which Drupal users are currently logged in &#8212; this is surprisingly not really possible using the Drupal core, and even more surprisingly not supported by any contrib modules than I could identify.
The obvious solution was to code my [...]]]></description>
			<content:encoded><![CDATA[<p>As part of a recent project for the excellent Nolej Studios, I needed a way to track which Drupal users are currently logged in &#8212; this is surprisingly not really possible using the Drupal core, and even more surprisingly not supported by any contrib modules than I could identify.</p>
<p>The obvious solution was to code my own module, and here it is: <a href="http://triopter.com/wordpress/wp-content/uploads/2010/06/usertrack.zip">usertrack</a>.  You can also check it out from Subversion at <a href="http://svn.triopter.com/drupal/usertrack/trunk/usertrack/" target="_blank">http://svn.triopter.com/drupal/usertrack/trunk/usertrack/</a> .</p>
<p>Usertrack includes simple Views integration for filtering, sorting, and annotating your User view with login status and last logout date.  Please read the README for compatibility and installation notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/introducing-usertrack-drupal-module-to-track-user-login-logout-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Payflow Pro on Mac OS X</title>
		<link>http://triopter.com/archive/installing-payflow-pro-on-mac-os-x/</link>
		<comments>http://triopter.com/archive/installing-payflow-pro-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 01:44:03 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/installing-payflow-pro-on-mac-os-x/</guid>
		<description><![CDATA[If you&#8217;ve done more than a little web development, you&#8217;ve probably encountered Payflow Pro, PayPal&#8217;s (previously Verisign&#8217;s) credit card processing solution.
It&#8217;s not supported on OS X.
But OS X is UNIX-y!  There&#8217;s a version for Linux!  Why won&#8217;t it work on OS X?  Can&#8217;t you google for installation instructions?
Well, no.  Perhaps my [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve done more than a little web development, you&#8217;ve probably encountered Payflow Pro, PayPal&#8217;s (previously Verisign&#8217;s) credit card processing solution.</p>
<p>It&#8217;s not supported on OS X.</p>
<p>But OS X is UNIX-y!  There&#8217;s a version for Linux!  Why won&#8217;t it work on OS X?  Can&#8217;t you google for installation instructions?</p>
<p>Well, no.  Perhaps my google-fu is weak, but I could find no information whatsoever about how to get it working.</p>
<p>In fact, if these guys hadn&#8217;t <a href="http://blog.duncandavidson.com/2005/05/ruby_java_and_p.html">pointed out</a> that <a href="http://www.clarkware.com/cgi/blosxom/2005/05/17#PayflowPro">it was possible</a>, I would have given up then and there.</p>
<p>But I got it installed.  And you can, too.  Here&#8217;s how:</p>
<ol>
<li>Make sure you have the Apple Developer Tools installed.</li>
<li>Download the Payflow Pro Java SDK (you have to log into a Payflow Pro account to get the download), and unzip it to your hard drive (it doesn&#8217;t matter where, as long as it&#8217;s a place where the user your web server runs as can get to it).</li>
<li><code>cd</code> into the <code>java</code> directory.</li>
<li>Set your paths.  I had trouble getting these to stick, so I&#8217;d love any suggestions anyone might have on that aspect:
<p><code>$ CLASSPATH=${CLASSPATH:-}:Verisign.jar:.;export CLASSPATH</code></p>
<p><code>$ libpath=.:../jni:../lib</code></p>
<p><code>$ LD_LIBRARY_PATH=$libpath:${LD_LIBRARY_PATH:-};export LD_LIBRARY_PATH</code></li>
<li>Compile the java code:
<p><code>$ javac PFProJava.java</code></li>
<li>Run a test transaction:
<p><code>$ java PFProJava test-payflow.verisign.com 443 "USER=YourUserName&#038;VENDOR=YourVendorName&#038;PARTNER=YourPartnerName&#038;PWD=YourPassword&#038;TRXTYPE=S&#038;TENDER=C&#038;ACCT=5105105105105100&#038;EXPDATE=1209&#038;AMT=1.23&#038;ZIP=12345&#038;comment1=Test JNI Transactions" 30</code></p>
<p>Don&#8217;t forget to insert the correct user/vendor/partner/password.</p>
<p>Oh, and when I tried it with an account that didn&#8217;t have a username (which is possible in payflow pro), it wouldn&#8217;t accept the transaction until I set the <code>USER</code> to be the same as the <code>VENDOR</code>.</li>
<li>I ran into another problem, which was that I kept getting a  <code>NoClassDefFoundError</code> even after following the above steps.  I fixed this by adding the absolute path to <code>Verisign.jar</code> to my CLASSPATH:
<p><code>$ CLASSPATH=${CLASSPATH:-}:/path/to/directory/Verisign.jar:.;export CLASSPATH</code></li>
<li>As I mentioned, I had a lot of trouble getting the CLASPATH to stick.  I couldn&#8217;t even run the binary from another directory &#8211; even if I speicified the full path to it.  In the end, the following sequence was the most reliable means of running a successful transaction:
<p><code>$ cd /path/to/binary/</code></p>
<p><code>$ CLASSPATH=${CLASSPATH:-}:Verisign.jar:/path/to/directory/Verisign.jar:.;export CLASSPATH</code></p>
<p><code>$ java PFProJava test-payflow.verisign.com 443 "USER=YourUserName&#038;VENDOR=YourVendorName&#038;PARTNER=YourPartnerName&#038;PWD=YourPassword&#038;TRXTYPE=S&#038;TENDER=C&#038;ACCT=5105105105105100&#038;EXPDATE=1209&#038;AMT=1.23&#038;ZIP=12345&#038;comment1=Test JNI Transactions" 30</code></p>
<p>Again, I&#8217;d gladly welcome suggestions as to how to make this work more fluidly.</li>
</ol>
<p>That&#8217;s that.  You&#8217;ve got it installed.  The following code will suffice to call it from PHP:</p>
<p><code>$pfpro_path = '/path/to/directory';</code></p>
<p><code>$pfpro_server = 'test-payflow.verisign.com'; // for test transactions.  Change this for live transactions.</code></p>
<p><code>$vars = '?your=values&#038;to=submit&#038;to=verisign'; // build this string appropriately from your variables according to the payflow documentation, and don't forget to run escapeshellcmd() on each one, since we'll be passing this to exec().</code></p>
<p><code>$cmd = 'cd "' . $pfpro_path . '; "; CLASSPATH=${CLASSPATH:-}:"' . $pfpro_path . '}Verisign.jar":.; export CLASSPATH; cd "' . $pfpro_path . '"; java PFProJava ' . $pfpro_server . ' 443 "' . $vars . '"'</code></p>
<p><code>$result_code = exec($cmd, $result_string);</code></p>
<p>Phew!</p>
<p>Good luck&#8230;. and if you happen to figure out that whole path issue, drop me a line!</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/installing-payflow-pro-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
