【问题标题】:Problem with PayPal checkout and Braintree classPayPal 结帐和 Braintree 类的问题
【发布时间】:2019-08-13 22:40:14
【问题描述】:

我正在尝试使用本教程设置 PayPal 结帐:

https://developer.paypal.com/docs/checkout/integrate/#

我遇到了第 6 步的问题。验证交易

php 脚本抛出:

解析错误:语法错误、意外的“类”(T_CLASS)、期望标识符 (T_STRING) 或变量 (T_VARIABLE) 或 /vendor/braintree/braintreehttp/lib/BraintreeHttp/HttpClient.php 中的“{”或“$”第 38 行

在浏览器控制台中。

function __construct(Environment $environment)
{
    $this->environment = $environment;
    $this->encoder = new Encoder();
    $this->curlCls = Curl::class;
}

最后一行是 38。有人知道这里出了什么问题吗?

【问题讨论】:

    标签: paypal braintree


    【解决方案1】:

    我遇到了同样的错误并注释掉了设置 curlCls 的行

    $this->curlCls = Curl::class;
    

    它看起来没有在任何地方使用,基本的 PayPal 示例开始工作。

    【讨论】:

      猜你喜欢
      • 2021-12-14
      • 2016-03-06
      • 2018-09-19
      • 2017-12-10
      • 1970-01-01
      • 2013-09-12
      • 1970-01-01
      • 2018-03-11
      • 2017-12-01
      相关资源
      最近更新 更多