From 97864ff38b4810bb3624178f9bf63e5beac8c652 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 3 Nov 2015 19:57:54 -0600 Subject: RT#38722: DFH: paymentech upload and download retry [fixed misspelled paymentech] --- FS/bin/freeside-paymentech-download | 2 +- FS/bin/freeside-paymentech-upload | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FS/bin/freeside-paymentech-download b/FS/bin/freeside-paymentech-download index 1b2f95175..9a1f609bc 100755 --- a/FS/bin/freeside-paymentech-download +++ b/FS/bin/freeside-paymentech-download @@ -20,7 +20,7 @@ getopts('vta:'); sub log_and_die { my $message = shift; - my $log = FS::Log->new('freeside-paymenttech-download'); + my $log = FS::Log->new('freeside-paymentech-download'); $log->error($message); die $message; } diff --git a/FS/bin/freeside-paymentech-upload b/FS/bin/freeside-paymentech-upload index a6e6a5d28..5ae147d07 100755 --- a/FS/bin/freeside-paymentech-upload +++ b/FS/bin/freeside-paymentech-upload @@ -20,7 +20,7 @@ getopts('avtp:'); sub log_and_die { my $message = shift; - my $log = FS::Log->new('freeside-paymenttech-upload'); + my $log = FS::Log->new('freeside-paymentech-upload'); $log->error($message); die $message; } -- cgit v1.2.1 From e334c4383752a12527396a498b629537e92f05bd Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 4 Nov 2015 00:21:03 -0600 Subject: RT#38314: Declined payment shows card as tokenized after first attempt [fixed if paymask is not passed] --- FS/FS/cust_main/Billing_Realtime.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 7a204073b..9112607d2 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -888,7 +888,7 @@ sub _realtime_bop_result { '_date' => '', 'payby' => $cust_pay_pending->payby, 'payinfo' => $options{'payinfo'}, - 'paymask' => $options{'paymask'}, + 'paymask' => $options{'paymask'} || $cust_pay_pending->paymask, 'paydate' => $cust_pay_pending->paydate, 'pkgnum' => $cust_pay_pending->pkgnum, 'discount_term' => $options{'discount_term'}, -- cgit v1.2.1 From 052eb9b8d16c4e81c0b6c609674e9ab768cb817d Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 4 Nov 2015 00:44:52 -0600 Subject: RT#38314: Declined payment shows card as tokenized after first attempt [fixed if paymask is not passed, take 2] --- FS/FS/cust_main/Billing_Realtime.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 9112607d2..c5039ff47 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -266,7 +266,10 @@ sub _bop_defaults { } } - $options->{payinfo} = $self->payinfo unless exists( $options->{payinfo} ); + unless ( exists( $options->{'payinfo'} ) ) { + $options->{'payinfo'} = $self->payinfo; + $options->{'paymask'} = $self->paymask; + } # Default invoice number if the customer has exactly one open invoice. if( ! $options->{'invnum'} ) { -- cgit v1.2.1 From 88ed72cdd96321a0eeaacc3107da413ab6e9dc98 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 5 Nov 2015 10:44:31 -0800 Subject: pass an invoice_number for void/refund when available, RT#37292 --- FS/FS/cust_main/Billing_Realtime.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 7a204073b..403d8dd1c 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -11,6 +11,7 @@ use FS::Record qw( qsearch qsearchs ); use FS::payby; use FS::cust_pay; use FS::cust_pay_pending; +use FS::cust_bill_pay; use FS::cust_refund; use FS::banned_pay; @@ -1366,6 +1367,8 @@ sub realtime_refund_bop { warn " $_ => $options{$_}\n" foreach keys %options; } + my %content = (); + ### # look up the original payment and optionally a gateway for that payment ### @@ -1384,6 +1387,9 @@ sub realtime_refund_bop { or return "Unknown paynum $options{'paynum'}"; $amount ||= $cust_pay->paid; + my @cust_bill_pay = qsearch('cust_bill_pay', { paynum=>$cust_pay->paynum }); + $content{'invoice_number'} = $cust_bill_pay[0]->invnum if @cust_bill_pay; + if ( $cust_pay->get('processor') ) { ($gatewaynum, $processor, $auth, $order_number) = ( @@ -1456,7 +1462,8 @@ sub realtime_refund_bop { eval "use $namespace"; die $@ if $@; - my %content = ( + %content = ( + %content, 'type' => $options{method}, 'login' => $login, 'password' => $password, -- cgit v1.2.1