如何将Square与Laravel集成

时间:2016-10-29 09:12:18

标签: php git laravel-5.2 payment-gateway square-connect

我在Laravel有一个应用程序,我正在关注this教程。我从here克隆了一个样本回购,当我尝试制作一个pyament形式时,它给了我以下回复

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)

当我尝试沙盒时它起作用了。

  • 如何收取低于100美元的金额?
  • 如何验证卡片,即以github仓库中给出的格式,他们不会要求持卡人姓名?
  • 如何将其他付款方式与现金或支票等方式相结合?

1 个答案:

答案 0 :(得分:1)

听起来你正试图建立一个基于网络的销售点。回答你的问题:

  • Square Register应用程序和API中信用卡的最低费用为1.00美元(100金额包括美分)
  • 这些卡主要通过CVV和邮政编码进行验证,您应该在表格中看到必填字段。
  • 此时您无法为其他投标类型(如现金或通过API查看)创建付款。 (这主要是因为我们的交易API专门用于电子商务,而自定义销售点通常是使用我们的Register APIs创建的)
相关问题