Skip to content

Commit 0418d2c

Browse files
committed
fixing some error handling in charge_card for when there is no cc present
1 parent 8bfa816 commit 0418d2c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cc.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ function charge_card($custid, $amount = false, $invoice = false, $module = 'defa
345345
$response['code'] = 0;
346346
//$cc = $data['cc'];
347347
$ccs = parse_ccs($data);
348-
$cc = isset(App::variables()->request['ot_cc']) && isset($ccs[App::variables()->request['ot_cc']]) ? App::decrypt($ccs[App::variables()->request['ot_cc']]['cc']) : App::decrypt($data['cc']);
348+
$cc = isset(App::variables()->request['ot_cc']) && isset($ccs[App::variables()->request['ot_cc']]) && isset($ccs[App::variables()->request['ot_cc']]['cc']) ? App::decrypt($ccs[App::variables()->request['ot_cc']]['cc']) : (isset($data['cc']) ? App::decrypt($data['cc']) : null);
349349
if (is_null($cc)) {
350350
if (isset($webpage) && $webpage == true) {
351351
add_output('<div class="container alert alert-danger"><strong>Error! Bad CC Number! </strong>This Credit-Card Number has been determined unusable or bad.</div>');

0 commit comments

Comments
 (0)