schedule => 'live',
};
+my $required = { map { $_ => 1 } ( qw(
+ login
+ password
+ command
+ amount
+ tender_type
+ _full_name
+ routing_code
+ check_number
+ _check_type
+))};
+
+
+
# Structure of the XML request document
# Right sides of the hash entries are Business::OnlinePayment
# field names. Those that start with _ are local method names.
elsif(exists($defaults->{$val})) {
$data->{$k} = $defaults->{$val};
}
- # 6. Fail.
+ # 6. If the value is not required, use an empty string.
+ elsif(! $required->{$val}) {
+ $data->{$k} = '';
+ }
+ # 7. Fail.
else {
croak "Missing request field: '$val'";
}