Skip to content

Commit c4b744f

Browse files
committed
updates adding an error check to make sure it was able to load invoices relating to a cc charge for the cc refund call
1 parent 38a9bc6 commit c4b744f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/admin/cc_refund.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ function_requirements('class.AuthorizeNetCC');
4040
$invoice_arr[] = $db_check_invoice->Record['invoices_id'];
4141
}
4242
}
43+
if (!isset($invoice_arr)) {
44+
add_output('Could not find any invoices matching the custid and transasction id criteria');
45+
return;
46+
}
4347
\MyAdmin\App::variables()->request['inv'] = implode(',', $invoice_arr);
4448
$do = strtotime(date('Y-m-d', strtotime($cc_log['cc_timestamp']))) == strtotime(date('Y-m-d')) ? 'void' : 'refund';
4549
$db = clone \MyAdmin\App::db();

0 commit comments

Comments
 (0)