summaryrefslogtreecommitdiff
path: root/OpenECHO.pm
diff options
context:
space:
mode:
Diffstat (limited to 'OpenECHO.pm')
-rw-r--r--OpenECHO.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenECHO.pm b/OpenECHO.pm
index 682c488..68a4400 100644
--- a/OpenECHO.pm
+++ b/OpenECHO.pm
@@ -223,7 +223,7 @@ sub submit {
license_num => 'ec_id_number',
license_state => 'ec_id_state',
#license_dob =>
- payee => 'ec_payee',
+ #get from new() args instead# payee => 'ec_payee',
check_number => 'ec_serial_number',
#recurring_billing => 'cnp_recurring',
@@ -235,7 +235,7 @@ sub submit {
#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})$/
@@ -246,6 +246,19 @@ sub submit {
$self->{_content}{ccexp_year} = $year;
}
+ if ( $self->transaction_type =~ /^D[DVCH]$/ ) { #echeck
+
+ #check number kludge... "periodic bill payments" don't have check #s!
+ $self->{_content}{ec_serial_number} = 'RECURRIN'
+ #$self->{_content}{ec_serial_number} = '00000000'
+ if ! length($self->{_content}{ec_serial_number})
+ && $self->{_content}{ec_payment_type} =~ /^(PPD)?$/i;
+
+ ( $self->{_content}{ec_payee} = $self->payee )
+ or croak "'payee' option required when instantiating new ".
+ "Business::OnlinePayment::OpenECHO object\n";
+ }
+
$self->{_content}{cnp_recurring} = 'Y'
if exists($self->{_content}{recurring_billing})
&& $self->{_content}{recurring_billing} =~ /^y/i;
@@ -655,8 +668,7 @@ Content required: type, login, password, action, amount, first_name, last_name,
=head2 Check
-Not yet implemented...
-#Content required: type, login, password, action, amount, first_name, last_name, account_number, routing_code, bank_name.
+Content required: type, login, password, action, amount, first_name, last_name, account_number, routing_code, bank_name. (...more)
=head1 PREREQUISITES