Business::OnlinePayment Payflow Pro fixes.
Dax
kruft at sisna.com
Tue Aug 12 10:58:05 PDT 2003
I recently downloaded and tested the payflow pro API from the Verisign
website. I was able to successfully make all, make test and make
install. (which btw, anyone can test by making a free test account. I
think the url was https://manager.verisign.com/ , but I don't recall.)
Upon clicking on 'bill now' and viewing the open invoice, I see:
capture Mon Aug 11 21:44:28 2003 done: PayflowPro error, invnum #2: -31:
The certificate chain did not validate, no local certificate found, Cert
Path
After many hours and some time to rest the ole' noggin, I decided I'd
submit a patch for it.
Enjoy.
Daxal, aka Scott Edwards.
-------------- next part --------------
--- PayflowPro.pm.orig 2003-08-12 10:13:16.000000000 -0600
+++ PayflowPro.pm 2003-08-12 11:02:09.000000000 -0600
@@ -5,6 +5,7 @@
use Carp qw(croak);
use AutoLoader;
use Business::OnlinePayment;
+use Cwd;
#PayflowPRO SDK from Verisign
use PFProAPI qw( pfpro );
@@ -177,8 +178,13 @@
#print "$_ => $params{$_}\n" foreach keys %params;
- $ENV{'PFPRO_CERT_PATH'} = $self->cert_path;
+ if ("" eq $ENV{'PFPRO_CERT_PATH'}) {
+ $ENV{'PFPRO_CERT_PATH'} = $self->cert_path;
+ }
+ my $oldpwd=cwd;
+ chdir $ENV{'PFPRO_CERT_PATH'};
my( $response, $resultstr ) = pfpro( \%params, $self->server, $self->port );
+ chdir $oldpwd;
#if ( $response->{'RESULT'} == 0 ) {
if ( $response->{'RESULT'} eq '0' ) { #want an explicit zero, not just
@@ -247,7 +253,15 @@
=head1 COMPATIBILITY
This module implements an interface to the PayflowPro Perl API, which can
-be downloaded at https://manager.verisign.com/ with a valid login.
+be downloaded at https://manager.verisign.com/ with a valid login. If you
+do not see the correct files in the download section (eg, just PDF files),
+contact Verisign to setup a testing account.
+
+=head1 CERTIFICATE PATH
+
+PFPRO_CERT_PATH is an environmental value telling us what directory f73e89fd.0
+is in. Consider using Apache's SetEnv directive if you have some type of CGI
+script that uses this module.
=head1 BUGS
@@ -256,6 +270,7 @@
Ivan Kohler <ivan-payflowpro at 420.am>
Based on Busienss::OnlinePayment::AuthorizeNet written by Jason Kohles.
+A workaround for handling PFPRO_CERT_PATH was provided by Scott Edwards. <payflowpro at surfthe.us>.
=head1 SEE ALSO
More information about the freeside-users
mailing list