=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
`LECB' (phone bill billing), `BILL' (billing), `PREP` (prepaid card),
-`CASH' (cash), `WEST' (Western Union) or `COMP' (free)
+`CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or
+`COMP' (free)
=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively
=item delete
-Deletes this payment and all associated applications (see L<FS::cust_bill_pay>),
-unless the closed flag is set. In most cases, you want to use the void
-method instead to leave a record of the deleted payment.
+Unless the closed flag is set, deletes this payment and all associated
+applications (see L<FS::cust_bill_pay> and L<FS::cust_pay_refund>). In most
+cases, you want to use the void method instead to leave a record of the
+deleted payment.
=cut
+# very similar to FS::cust_credit::delete
sub delete {
my $self = shift;
return "Can't delete closed payment" if $self->closed =~ /^Y/i;
=item replace OLD_RECORD
-You probably shouldn't modify payments...
+You can, but probably shouldn't modify payments...
+
+=cut
+
+sub replace {
+ #return "Can't modify payment!"
+ my $self = shift;
+ return "Can't modify closed payment" if $self->closed =~ /^Y/i;
+ $self->SUPER::replace(@_);
+}
=item check
$self->_date(time) unless $self->_date;
- $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREP|CASH|WEST)$/
+ $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREP|CASH|WEST|MCRD)$/
or return "Illegal payby";
$self->payby($1);