From 769b3187c2b9ae30de03d3211d22e84e9dad6776 Mon Sep 17 00:00:00 2001 From: ethem Date: Thu, 20 Jul 2006 14:48:03 +0000 Subject: [PATCH] x_auth_code is required for capture only transactions! NOTE: Capture only transactions have not implemented yet! --- enrol/authorize/authorizenetlib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/enrol/authorize/authorizenetlib.php b/enrol/authorize/authorizenetlib.php index 374141251b..978d7085bf 100644 --- a/enrol/authorize/authorizenetlib.php +++ b/enrol/authorize/authorizenetlib.php @@ -137,10 +137,15 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE) $message = "Order status must be AN_STATUS_NONE(0)!"; return false; } - if (empty($extra)) { + elseif (empty($extra)) { $message = "Need extra fields!"; return false; } + elseif (($action == AN_ACTION_CAPTURE_ONLY) and empty($extra->x_auth_code)) { + $message = "x_auth_code is required for capture only transactions!"; + return false; + } + $ext = (array)$extra; $poststring .= '&x_type=' . (($action==AN_ACTION_AUTH_ONLY) ? 'AUTH_ONLY' :( ($action==AN_ACTION_CAPTURE_ONLY) -- 2.39.5