[freeside-users] Paypal integration bugfix
Ivan Kohler
ivan at sisd.com
Fri Mar 2 17:30:18 PST 2007
On Sat, Nov 11, 2006 at 06:35:21PM +0100, Eric wrote:
> All,
>
> I had some trouble getting freeside to work with paypal realtime credit
> card processing.
>
> These proved to be the fixes necessary to make it work:
> --- cust_main.pm 2005-12-24 19:52:27.000000000 -0500
> +++ /usr/lib/perl5/site_perl/5.8.8/FS/cust_main.pm 2006-11-11
> 12:18:57.000000000 -0500
> @@ -2375,7 +2375,7 @@
>
> my $transaction = new Business::OnlinePayment( $processor,
> @bop_options );
> $transaction->content(
> - 'type' => $method,
> + 'type' => $cardtype,
> 'login' => $login,
> 'password' => $password,
> 'action' => $action1,
> @@ -2402,6 +2402,7 @@
> 'referer' => 'http://cleanwhisker.420.am/',
> 'email' => $email,
> 'phone' => $self->daytime || $self->night,
> + 'IPAddress' => $payip,
> %content, #after
> );
> $transaction->submit();
>
I don't think these changes should be necessary. I have filed bugs on
Business::OnlinePayment::PayPal for the fixes necessary to accept
standard parameters:
http://rt.cpan.org/Ticket/Display.html?id=25260
http://rt.cpan.org/Ticket/Display.html?id=25259
The maintainer is typically very active so I expect these will be fixed
in a Business::OnlinePayment::PayPal 0.12 release soon.
> --- signup.cgi 2005-03-12 09:35:12.000000000 -0500
> +++ /srv/www/htdocs/selfservice/signup.cgi 2006-11-11 12:14:24.000000000
> -0500
> @@ -130,6 +130,7 @@
>
> $error = '';
>
> + $cgi->param('payip' => $cgi->remote_host());
> $cgi->param('agentnum', $agentnum) if $agentnum;
> $cgi->param('reg_code', uc(scalar($cgi->param('reg_code'))) );
>
> @@ -193,7 +194,7 @@
> payby payinfo paycvv paydate payname invoicing_list
> referral_custnum promo_code reg_code
> pkgpart username sec_phrase _password popnum refnum
> - agentnum
> + agentnum payip
> ),
> grep { /^snarf_/ } $cgi->param
> } );
I have applied this section of the patch (no reason to stuff it into a
CGI param, though). Thanks!
--
_ivan
More information about the freeside-users
mailing list