From 81550586924e1f56af9dd59fea1df8724784e947 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 14 Jun 2007 00:24:57 +0000 Subject: [PATCH] B:OP:HTTPS: Normalize https_post (and debugging) response_code to "NNN message" even when using LWP/Crypt::SSLeay. --- Changes | 2 ++ OnlinePayment/HTTPS.pm | 18 +++++++++--------- 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 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"; -- 2.11.0