Braintree PHP所需版本冲突

问题描述 投票:0回答:1

我正在尝试在服务器上设置服务器端Braintree PHP库。我从他们提供的链接中下载了Braintree PHP库,并将其解压缩并上传到我的服务器。我创建了一个config.php文件,其中包含服务器上PHP库的路径,并按如下所示定义我的API凭据:

<?php require_once 'btphp/lib/Braintree.php'; Braintree_Configuration::environment('sandbox');Braintree_Configuration::merchantId('yqjkd7r5kdtdyq9d');Braintree_Configuration::publicKey('ssjcrbg3qff8cnk2');Braintree_Configuration::privateKey('6fd935bc49457f318027b52bd262572e');$clientToken = $gateway->clientToken()->generate(["customerId" => $aCustomerId]);?>

在执行文件时,出现致命错误,指出需要PHP版本7.2。

Fatal error: Uncaught exception 'Braintree\Exception' with message 'PHP version >= 7.2.0 required' in /home/content/37/11957537/html/ua/btphp/lib/Braintree.php:10 Stack trace: #0 /home/content/37/11957537/html/ua/btconfig.php(3): require_once() #1 {main} thrown in /home/content/37/11957537/html/ua/btphp/lib/Braintree.php on line 10

Braintree文档明确指出以下内容:

可用性Braintree PHP SDK需要PHP 5.4.0或更高版本以及PHP cURL扩展名。

我的虚拟主机PHP版本是5.6

任何人都可以解释为什么会这样。

php paypal paypal-sandbox braintree
1个回答
0
投票

要解决此问题。您需要对它们进行评论,如Braintree.php中的image(9,10,11)行中所示。enter image description here

这是我的工作。

© www.soinside.com 2019 - 2024. All rights reserved.