summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2007-06-14 00:24:57 +0000
committerivan <ivan>2007-06-14 00:24:57 +0000
commit81550586924e1f56af9dd59fea1df8724784e947 (patch)
tree54af0a8fa8e6df71022ecf3f1f5f765678f4fc1a
parent900493d1e1548447a55878553c625ab4d49a1c11 (diff)
B:OP:HTTPS: Normalize https_post (and debugging) response_code to "NNN message" even when using LWP/Crypt::SSLeay.BUSINESS_ONLINEPAYMENT_3_00_08
-rw-r--r--Changes2
-rw-r--r--OnlinePayment/HTTPS.pm18
2 files changed, 11 insertions, 9 deletions
diff --git a/Changes b/Changes
index 3afc308..1c4afe3 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Revision history for Perl extension Business::OnlinePayment.
3.00_08 unreleased
- B:OP:HTTPS: set response_page, response_code, response_headers
+ - B:OP:HTTPS: Normalize https_post (and debugging) response_code to
+ "NNN message" even when using LWP/Crypt::SSLeay.
- B:OP: defined &$class is not how you detect if a class has been loaded
(just using use should be fine). Closes: CPAN#22071
- Enable retrieval of fraud transaction score and transaction ID,
diff --git a/OnlinePayment/HTTPS.pm b/OnlinePayment/HTTPS.pm
index 1f84069..1f44397 100644
--- a/OnlinePayment/HTTPS.pm
+++ b/OnlinePayment/HTTPS.pm
@@ -6,7 +6,7 @@ use URI::Escape;
use Tie::IxHash;
use base qw(Business::OnlinePayment);
-$VERSION = '0.07';
+$VERSION = '0.08';
$DEBUG = 0;
BEGIN {
@@ -85,8 +85,8 @@ In the latter case, ordering is preserved (see L<Tie::IxHash> to do so
when passing a hashref).
Returns a list consisting of the page content as a string, the HTTP
-response code, and a list of key/value pairs representing the HTTP
-response headers.
+response code and message (i.e. "200 OK" or "404 Not Found"), and a list of
+key/value pairs representing the HTTP response headers.
The options hashref supports setting headers and Content-Type:
@@ -180,10 +180,10 @@ sub https_get {
$res->header_field_names;
$self->response_page( $res->content );
- $self->response_code( $res->code );
+ $self->response_code( $res->code. ' '. $res->message );
$self->response_headers( { @res_headers } );
- ( $res->content, $res->code, @res_headers );
+ ( $res->content, $res->code. ' '. $res->message, @res_headers );
} else {
die "unknown SSL module $ssl_module";
@@ -200,8 +200,8 @@ passing a hashref).
Also accepts instead a simple scalar containing the raw content.
Returns a list consisting of the page content as a string, the HTTP
-response code, and a list of key/value pairs representing the HTTP
-response headers.
+response code and message (i.e. "200 OK" or "404 Not Found"), and a list of
+key/value pairs representing the HTTP response headers.
The options hashref supports setting headers and Content-Type:
@@ -315,10 +315,10 @@ sub https_post {
$res->header_field_names;
$self->response_page( $res->content );
- $self->response_code( $res->code );
+ $self->response_code( $res->code. ' '. $res->message );
$self->response_headers( { @res_headers } );
- ( $res->content, $res->code, @res_headers );
+ ( $res->content, $res->code. ' '. $res->message, @res_headers );
} else {
die "unknown SSL module $ssl_module";