Business-OnlinePayment-OpenECHO
view release on metacpan or search on metacpan
OpenECHO.pm view on Meta::CPAN
226227228229230231232233234235236237238239240241242243244245246
#get from new() args instead# payee => 'ec_payee',
check_number
=>
'ec_serial_number'
,
#recurring_billing => 'cnp_recurring',
);
#XXX hosted order_type?
$self
->{_content}{order_type} =
'S'
;
#XXX counter field shouldn't be just a random integer (but it does need a
#default this way i guess...
$self
->{_content}{counter} =
int
(
rand
(2**31));
if
(
$self
->transaction_type =~ /^[EA][VS]$/ ) {
#ccexp_month & ccexp_year
$self
->{_content}{
'expiration'
} =~ /^(\d+)\D+\d*(\d{2})$/
or croak
"unparsable expiration "
.
$self
->{_content}{expiration};
my
(
$month
,
$year
) = ( $1, $2 );
$month
=
'0'
.
$month
if
$month
=~ /^\d$/;
$self
->{_content}{ccexp_month} =
$month
;
$self
->{_content}{ccexp_year} =
$year
;
( run in 0.260 second using v1.01-cache-2.11-cpan-94b05bcf43c )