From ff7364fa72bcf24ad8b1294e2df2b4b344e16094 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 27 Dec 2016 15:36:57 -0500 Subject: [PATCH] Update for form processing. do contact processing after the auth.net. if the card isn't good then don't store the contact. --- Toolkit/Contacts/PassPort.php | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/Toolkit/Contacts/PassPort.php b/Toolkit/Contacts/PassPort.php index 78048f4..2d5ec06 100755 --- a/Toolkit/Contacts/PassPort.php +++ b/Toolkit/Contacts/PassPort.php @@ -691,25 +691,21 @@ class Toolkit_Contacts_PassPort // }}} public function processData($values) { - $res = parent::processData($values); - if ($res) { - $res2 = $this->processAuthNet($values); - if (is_array($res2) && !empty($res2)) { - if ($res2[0] == 1) { - // CC was Accepted. - return true; - } elseif ($res2[0] == 2) { - // CC was Declined. - return 2; - } else { - // There was a CC processing error. - return $res2[0]; - } + $res2 = $this->processAuthNet($values); + if (is_array($res2) && !empty($res2)) { + if ($res2[0] == 1) { + // CC was Accepted. + $res = parent::processData($values); + return true; + } elseif ($res2[0] == 2) { + // CC was Declined. + return 2; } else { // There was a CC processing error. - return false; + return $res2[0]; } } else { + // There was a CC processing error. return false; } } -- 2.17.1