NikolaGavric94 / laravel-square

Square integration with Laravel/Lumen >=5.5
MIT License
31 stars 23 forks source link

Error message #54

Closed extjac closed 3 years ago

extjac commented 3 years ago

Do you know what might be causing this error: Code:

$options = [
      'amount' => '1000',
      'source_id' => request()->nonce,
      'location_id' => 'my_code_is_here',
      'currency' => 'USD',
      'note' => 'Test',
      'reference_id' => '010101'
    ];

Square::charge($options); // Simple charge

Error:

SquareConnect\ApiException
[HTTP/2 400] {"errors": [{"code": "EXPECTED_INTEGER","detail": "Expected an integer value (line 1, character 108)","field": "amount_money.amount","category": "INVALID_REQUEST_ERROR"}]}
NikolaGavric94 commented 3 years ago

Hello, variable amount should be of type integer, not string