projects
/
Business-OnlinePayment-AuthorizeNet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b4ea76
)
Added referer field, patch from Mike Barry <mbarry@cos.com>
author
ivan
<ivan>
Sat, 3 Aug 2002 21:20:51 +0000
(21:20 +0000)
committer
ivan
<ivan>
Sat, 3 Aug 2002 21:20:51 +0000
(21:20 +0000)
AuthorizeNet.pm
patch
|
blob
|
history
Changes
patch
|
blob
|
history
diff --git
a/AuthorizeNet.pm
b/AuthorizeNet.pm
index
028b6d8
..
8a389b9
100644
(file)
--- a/
AuthorizeNet.pm
+++ b/
AuthorizeNet.pm
@@
-1,11
+1,11
@@
package Business::OnlinePayment::AuthorizeNet;
package Business::OnlinePayment::AuthorizeNet;
-# $Id: AuthorizeNet.pm,v 1.1
1 2002-07-31 14:38:17
ivan Exp $
+# $Id: AuthorizeNet.pm,v 1.1
2 2002-08-03 21:20:51
ivan Exp $
use strict;
use Carp;
use Business::OnlinePayment;
use strict;
use Carp;
use Business::OnlinePayment;
-use Net::SSLeay qw/make_form post_https/;
+use Net::SSLeay qw/make_form post_https
make_headers
/;
use Text::CSV_XS;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use Text::CSV_XS;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
@@
-49,6
+49,10
@@
sub map_fields {
$content{'type'} = $types{lc($content{'type'})} || $content{'type'};
$self->transaction_type($content{'type'});
$content{'type'} = $types{lc($content{'type'})} || $content{'type'};
$self->transaction_type($content{'type'});
+ $content{'referer'} = defined( $content{'referer'} )
+ ? make_headers( 'Referer' => $content{'referer'} )
+ : "";
+
# stuff it back into %content
$self->content(%content);
}
# stuff it back into %content
$self->content(%content);
}
@@
-141,7
+145,8
@@
sub submit {
my $s = $self->server();
my $p = $self->port();
my $t = $self->path();
my $s = $self->server();
my $p = $self->port();
my $t = $self->path();
- my($page,$server_response,%headers) = post_https($s,$p,$t,'',$pd);
+ my $r = $self->{_content}->{referer};
+ my($page,$server_response,%headers) = post_https($s,$p,$t,$r,$pd);
#escape NULL (binary 0x00) values
$page =~ s/\x00/\^0/g;
#escape NULL (binary 0x00) values
$page =~ s/\x00/\^0/g;
@@
-202,6
+207,7
@@
Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin
card_number => '4007000000027',
expiration => '09/02',
cvv2 => '1234', #optional
card_number => '4007000000027',
expiration => '09/02',
cvv2 => '1234', #optional
+ referer => 'http://valid.referer.url/',
);
$tx->submit();
);
$tx->submit();
@@
-263,6
+269,8
@@
Jason Spence <jspence@lightconsulting.com> contributed support for separate
Authorization Only and Post Authorization steps and wrote some docs.
OST <services@ostel.com> paid for it.
Authorization Only and Post Authorization steps and wrote some docs.
OST <services@ostel.com> paid for it.
+T.J. Mather <tjmather@maxmind.com> sent a patch for the CVV2 field.
+
=head1 SEE ALSO
perl(1). L<Business::OnlinePayment>.
=head1 SEE ALSO
perl(1). L<Business::OnlinePayment>.
diff --git
a/Changes
b/Changes
index
537a79a
..
a1903d1
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-2,6
+2,7
@@
Revision history for Perl extension Business::OnlinePayment::AuthorizeNet.
3.12 unreleased
- Added cvv2 field, patch from "T.J. Mather" <tjmather@maxmind.com>
3.12 unreleased
- Added cvv2 field, patch from "T.J. Mather" <tjmather@maxmind.com>
+ - Added referer field, patch from Mike Barry <mbarry@cos.com>
3.11 Sat May 4 00:43:36 PDT 2002
- forgot 3.10 changelog in 3.10 :)
3.11 Sat May 4 00:43:36 PDT 2002
- forgot 3.10 changelog in 3.10 :)