From 976073a8fe90018f61dc5e26470a59b58ebea373 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 6 Aug 2008 05:42:14 +0000 Subject: [PATCH] add recurring_billing handling --- Changes | 6 ++++-- META.yml | 12 ++++++++++++ PlugnPay.pm | 8 ++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 META.yml diff --git a/Changes b/Changes index 0f8ea84..f0f06a5 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,6 @@ -0.01 Wed Oct 31 23:24:14 EDT 2007 - - original version; created by jeff +0.03 Wed Aug 6 1:37:50 EDT 2008 + - add handling of 'recurring_billing' content member 0.02 Wed Nov 2 1:48:42 EDT 2007 - correct silly test bug +0.01 Wed Oct 31 23:24:14 EDT 2007 + - original version; created by jeff diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..a937053 --- /dev/null +++ b/META.yml @@ -0,0 +1,12 @@ +# http://module-build.sourceforge.net/META-spec.html +#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# +name: Business-OnlinePayment-PlugnPay +version: 0.03 +version_from: PlugnPay.pm +installdirs: site +requires: + Business::OnlinePayment: 3 + Business::OnlinePayment::HTTPS: 0.04 + +distribution_type: module +generated_by: ExtUtils::MakeMaker version 6.17 diff --git a/PlugnPay.pm b/PlugnPay.pm index 47ba37d..fac5ad4 100644 --- a/PlugnPay.pm +++ b/PlugnPay.pm @@ -6,7 +6,7 @@ use Carp qw(carp croak); use base qw(Business::OnlinePayment::HTTPS); -$VERSION = '0.02'; +$VERSION = '0.03'; $VERSION = eval $VERSION; $DEBUG = 0; @@ -93,6 +93,9 @@ sub _map_fields { $self->transaction_type( $content{'type'} ); + $content{'transflags'} = 'recurring' + if lc( $content{'recurring_billing'} ) eq 'yes'; + # stuff it back into %content $self->content(%content); } @@ -164,7 +167,7 @@ sub submit { country ipaddress accttype orderID tax shipping app-level order-id acct_code magstripe marketdata carissuenum cardstartdate descrcodes - retailterms) ]; + retailterms transflags ) ]; $optional{CC_newreturn} = [ qw( orderID card-address1 card-address2 card-city card-state card-zip card-country notify-email @@ -452,6 +455,7 @@ from content(%content): zip => 'ship_zip', country => 'ship_country', + transflags => 'recurring' if ($content{recurring_billing}) eq 'yes', =head1 Mapping plugnpay transaction responses to object methods -- 2.11.0