Need to return the response from square
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 16 Apr 2019 18:31:26 +0000 (14:31 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 16 Apr 2019 18:31:26 +0000 (14:31 -0400)
Need to get some data back from square when doing payments.

lib/paymentProcessors/Square/paymentGateway.php

index 07c2967..a86be2b 100755 (executable)
@@ -303,6 +303,7 @@ class PaymentGateway
         # a 200-level HTTP code. This block catches any exceptions that occur from the request.
         try {
             $result = $transactionApi->charge( $locationId, $txRequest );
+            // echo '<pre>$result: ' . print_r( $result, true ) . '</pre>';
             $resp = array(
                 'gateway'     => 'Square',
                 'status'      => 1,
@@ -311,6 +312,7 @@ class PaymentGateway
                 'transId'     => '',
                 'refId'       => $refId,
                 'description' => '<pre>200 response: ' . print_r( $result, true) . '</pre>',
+                'response'    => $result,
             );
             return $resp;
         } catch ( \SquareConnect\ApiException $e ) {