B:OP:HTTPS: Normalize https_post (and debugging) response_code to "NNN message" even... BUSINESS_ONLINEPAYMENT_3_00_08
authorivan <ivan>
Thu, 14 Jun 2007 00:24:57 +0000 (00:24 +0000)
committerivan <ivan>
Thu, 14 Jun 2007 00:24:57 +0000 (00:24 +0000)
Changes
OnlinePayment/HTTPS.pm

diff --git a/Changes b/Changes
index 3afc308..1c4afe3 100644 (file)
--- 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,
index 1f84069..1f44397 100644 (file)
@@ -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";