give a man a hammer...
This commit is contained in:
parent
cb938487cb
commit
96ba0da75a
4 changed files with 5 additions and 5 deletions
|
|
@ -94,7 +94,7 @@ sub addPaymentGateway {
|
|||
WebGUI::Error::InvalidParam->throw(error => q{Must provide a class to create an object})
|
||||
unless defined $requestedClass;
|
||||
WebGUI::Error::InvalidParam->throw(error => q{The requested class is not enabled in your WebGUI configuration file}, param => $requestedClass)
|
||||
unless isIn($requestedClass, (keys %{$self->getDrivers}) );
|
||||
unless exists $self->getDrivers->{$requestedClass};
|
||||
WebGUI::Error::InvalidParam->throw(error => q{You must pass a hashref of options to create a new PayDriver object})
|
||||
unless defined($options) and ref $options eq 'HASH' and scalar keys %{ $options };
|
||||
my $driver = eval { WebGUI::Pluggable::instanciate($requestedClass, 'create', [ $self->session, $options ]) };
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ sub addShipper {
|
|||
WebGUI::Error::InvalidParam->throw(error => q{Must provide a class to create an object})
|
||||
unless defined $requestedClass;
|
||||
WebGUI::Error::InvalidParam->throw(error => q{The requested class is not enabled in your WebGUI configuration file}, param => $requestedClass)
|
||||
unless isIn($requestedClass, (keys %{$self->getDrivers}) );
|
||||
unless exists $self->getDrivers->{$requestedClass};
|
||||
WebGUI::Error::InvalidParam->throw(error => q{You must pass a hashref of options to create a new ShipDriver object})
|
||||
unless defined($options) and ref $options eq 'HASH' and scalar keys %{ $options };
|
||||
my $driver = eval { WebGUI::Pluggable::instanciate($requestedClass, 'create', [ $self->session, $options ]) };
|
||||
|
|
|
|||
|
|
@ -980,7 +980,7 @@ sub www_addVATNumber {
|
|||
my ($countryCode, $number) = $vatNumber =~ m/^([A-Z]{2})([A-Z0-9]+)$/;
|
||||
|
||||
my $errorMessage;
|
||||
$errorMessage = $i18n->get('illegal country code') unless isIn( $countryCode, keys %EU_COUNTRIES );
|
||||
$errorMessage = $i18n->get('illegal country code') unless exists $EU_COUNTRIES{$countryCode};
|
||||
$errorMessage = $i18n->get('already has vat number') if @{ $self->getVATNumbers( $countryCode ) };
|
||||
$errorMessage = $self->addVATNumber( $vatNumber ) unless $errorMessage;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue