baig772
baig772

Reputation: 3488

How to integrate square with Laravel

I have an app in Laravel and I am following this tutorial. I cloned a sample repo from here and When I try to make a pyament form this, it gives me the following response

Caught exception!
Response body:

object(stdClass)[6]
  public 'errors' => 
    array (size=1)
      0 => 
        object(stdClass)[7]
          public 'category' => string 'INVALID_REQUEST_ERROR' (length=21)
          public 'code' => string 'VALUE_TOO_LOW' (length=13)
          public 'detail' => string '`amount_money.amount` must be greater than 100.' (length=47)
          public 'field' => string 'amount_money.amount' (length=19)


Response headers:

array (size=12)
  0 => string 'HTTP/1.1 400 Bad Request' (length=24)
  'Content-Type' => string 'application/json' (length=16)
  'Vary' => string 'Origin, Accept-Encoding' (length=23)
  'X-Content-Type-Options' => string 'nosniff' (length=7)
  'X-Download-Options' => string 'noopen' (length=6)
  'X-Frame-Options' => string 'SAMEORIGIN' (length=10)
  'X-Permitted-Cross-Domain-Policies' => string 'none' (length=4)
  'X-Xss-Protection' => string '1; mode=block' (length=13)
  'Date' => string 'Sat, 29 Oct 2016 08:23:51 GMT' (length=29)
  'Keep-Alive' => string 'timeout=60' (length=10)
  'Strict-Transport-Security' => string 'max-age=631152000' (length=17)
  'content-length' => string '161' (length=3)

It worked when i tried the sandbox.

Upvotes: 0

Views: 3367

Answers (1)

tristansokol
tristansokol

Reputation: 4271

It sounds like you are trying to make a web based point of sale. To answer your questions:

  • The minimum charge for Credit Cards, both in the Square Register app and the API is $1.00 (the 100 amount includes cents)
  • The cards are primarily validated with CVV and postal code, which you should see as required fields in the form.
  • At this time you cannot create payments for other tender types like cash or check through the API. (This is primarily because our transaction APIs are used for e-commerce exclusively, while custom point of sales are usually created with our Register APIs)

Upvotes: 1

Related Questions