Payment processor update
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 21 May 2019 12:15:12 +0000 (08:15 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 21 May 2019 12:15:54 +0000 (08:15 -0400)
check for nonce

lib/paymentProcessors/Square/paymentGateway.php

index a86be2b..78d766f 100755 (executable)
@@ -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,//.'<pre>'.print_r($responseBody, true).'</pre>',
             );
             return $resp;
         }