+# because we can't actually name the field 'authorization' (reserved word)
+sub authorization {
+ my $self = shift;
+ $self->auth(@_);
+}
+
+=item payinfo_check
+
+Checks the validity of the realtime payment fields (gatewaynum, processor,
+auth, and order_number) as well as payby and payinfo
+
+=cut
+
+sub payinfo_check {
+ my $self = shift;
+
+ # All of these can be null, so in principle this could go in payinfo_Mixin.
+
+ $self->SUPER::payinfo_check()
+ || $self->ut_numbern('gatewaynum')
+ # not ut_foreign_keyn, it causes upgrades to fail
+ || $self->ut_alphan('processor')
+ || $self->ut_textn('auth')
+ || $self->ut_textn('order_number')
+ || '';
+}
+