or download this
$attrs{'error'} = 'cancel-url and success-url cannot be de
+rived from the environment and need to be provided' unless ($attrs{'c
+ancel-url'} and $attrs{'success-url'});
...
$attrs{'error'} = 'Secret API key is missing' unless $attrs{'api-s
+ecret'};
return bless \%attrs, $class;