From f88387382c2b1c49819aa6506e5aae8679278c5c Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 30 Jun 2017 16:27:05 -0700 Subject: [PATCH] fix card signup in v4 --- FS/FS/cust_main/Billing_Realtime.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 85039c030..f79ed7063 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -126,6 +126,13 @@ sub realtime_collect { $options{amount} = $self->balance unless exists( $options{amount} ); return '' unless $options{amount} > 0; + #huh, in v4, realtime_bop no longer will just process a card without passing + # payinfo or cust_payby... + if ( ! $options{'payinfo'} && ! $options{'cust_payby'} && $self->has_cust_payby_auto ) { + my @cust_payby = $self->cust_payby; + $options{'cust_payby'} = $cust_payby[0]; + } + return $self->realtime_bop({%options}); } -- 2.20.1