X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=StGeorge.pm;h=cd172ba0d98fd05f7aa2987f03e7657020564af7;hb=HEAD;hp=cea459cf7316ab818eff8bc3cad6ad4c94d3742c;hpb=50e4bcc992753f5536b0ab1960b4c6e982cb6212;p=Business-OnlinePayment-StGeorge.git diff --git a/StGeorge.pm b/StGeorge.pm index cea459c..cd172ba 100644 --- a/StGeorge.pm +++ b/StGeorge.pm @@ -6,9 +6,10 @@ use Carp qw(croak); use Business::OnlinePayment; @ISA = qw(Business::OnlinePayment); -$VERSION = '0.01'; +$VERSION = '0.03'; use webpayperl; #webpayperl.pm from St.George +webpayperl::init_client or croak "St.George initialization failed\n"; sub set_defaults { my $self = shift; @@ -164,10 +165,6 @@ sub submit { # if ( $DEBUG ) { warn "$_ => $post{$_}\n" foreach keys %post; } - webpayperl::init_client or croak "St.George initialization failed\n"; - #dd this to all exit places after here - #webpayperl::cleanup( $webpayRef ); - my $webpayRef = webpayperl::newBundle; webpayperl::addVersionInfo($webpayRef); webpayperl::put($webpayRef, "DEBUG", "OFF"); @@ -194,7 +191,6 @@ sub submit { ); webpayperl::cleanup( $webpayRef ); - webpayperl::free_client(); return; } @@ -216,10 +212,13 @@ sub submit { } webpayperl::cleanup( $webpayRef ); - webpayperl::free_client(); } +END { + webpayperl::free_client(); +} + 1; __END__