B:OP:HTTPS: Normalize https_post (and debugging) response_code to "NNN message" even...
[Business-OnlinePayment.git] / OnlinePayment / HTTPS.pm
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";