summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfbriere <fbriere>2006-02-17 19:30:05 +0000
committerfbriere <fbriere>2006-02-17 19:30:05 +0000
commitd36a582af7a5f74a6a450c45f8838711eb6f89ab (patch)
tree93f2b562302babd91ac1d7a401bd3ba197344303
parent5f50c3c62de5b5eecac3844fd838c91ed18bfd39 (diff)
Added UUID support
-rwxr-xr-xInternetSecure.pm13
-rwxr-xr-xt/30parse.t5
2 files changed, 17 insertions, 1 deletions
diff --git a/InternetSecure.pm b/InternetSecure.pm
index 2ad18fd..34acc97 100755
--- a/InternetSecure.pm
+++ b/InternetSecure.pm
@@ -37,7 +37,7 @@ sub set_defaults {
$self->path('/process.cgi');
$self->build_subs(qw(
- receipt_number sales_number
+ receipt_number sales_number uuid guid
date
card_type cardholder
total_amount
@@ -249,6 +249,8 @@ sub parse_response {
receipt_number => 'ReceiptNumber',
sales_number => 'SalesOrderNumber',
+ uuid => 'GUID',
+ guid => 'GUID',
date => 'Date',
cardholder => 'xxxName',
@@ -467,6 +469,15 @@ InternetSecure transactions.
Sales order number of this transaction. This is a number, unique to each
merchant, which is incremented by 1 each time.
+=item uuid()
+
+Universally Unique Identifier associated to this transaction. This is a
+128-bit value returned as a 36-character string such as
+C<f81d4fae-7dec-11d0-a765-00a0c91e6bf6>. See RFC 4122 for more details on
+UUIDs.
+
+B<guid>() is provided as an alias to this method.
+
=item date()
Date and time of the transaction. Format is C<YYYY/MM/DD hh:mm:ss>.
diff --git a/t/30parse.t b/t/30parse.t
index cfc2b55..7962c1a 100755
--- a/t/30parse.t
+++ b/t/30parse.t
@@ -20,6 +20,8 @@ use constant RESULTS => (
avs_response => undef,
cvv2_response => undef,
total_amount => 3.88,
+ uuid => 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6',
+ guid => 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6',
},
{
is_success => 0,
@@ -33,6 +35,8 @@ use constant RESULTS => (
avs_response => undef,
cvv2_response => undef,
total_amount => 3.88,
+ uuid => undef,
+ guid => undef,
},
);
@@ -128,6 +132,7 @@ __DATA__
<DoubleColonProducts>3.10::1::001::Test Product 1::{USD}{GST}{TEST}|0.20::1::010::Test Product 2::{GST}{TEST}|0.33::1::020::Test Product 3::{GST}{TEST}|0.25::1::GST::Canadian GST Charged::{TAX}{CALCULATED}</DoubleColonProducts>
<AVSResponseCode />
<CVV2ResponseCode />
+ <GUID>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</GUID>
</TranxResponse>
<?xml version="1.0" encoding="UTF-8"?>