From bf2e7e1d5a8a9a88a1a99ca745add32311cdb09a Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 21 May 2019 08:15:12 -0400 Subject: [PATCH] Payment processor update check for nonce --- lib/paymentProcessors/Square/paymentGateway.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/paymentProcessors/Square/paymentGateway.php b/lib/paymentProcessors/Square/paymentGateway.php index a86be2b5..78d766f2 100755 --- a/lib/paymentProcessors/Square/paymentGateway.php +++ b/lib/paymentProcessors/Square/paymentGateway.php @@ -219,7 +219,7 @@ class PaymentGateway # Fail if the card form didn't send a value for `nonce` to the server $nonce = $_POST['nonce']; - if (is_null($nonce)) { + if (!$nonce || is_null($nonce)) { $resp = array( 'gateway' => 'Square', 'status' => 2, @@ -336,7 +336,7 @@ class PaymentGateway 'authCode' => '', 'transId' => '', 'refId' => $refId, - 'description' => $description, + 'description' => $description,//.'
'.print_r($responseBody, true).'
', ); return $resp; } -- 2.17.1