在Paypal上安装商家SDK用于Express Checkout API



正如标题所说,我正在尝试在Paypal上安装商家SDK用于Express Checkout API。

composer.json

{
    "name": "paypal/merchant-sdk-php",
    "description": "PayPal Merchant SDK for PHP",
    "keywords": ["paypal", "php", "sdk"],
    "homepage": "https://developer.paypal.com",
    "license": "proprietary",
    "authors": [
        {
            "name": "PayPal",
            "homepage": "https://github.com/paypal/merchant-sdk-php/contributors"
        }
    ],
    "require": {
              "php": ">=5.3",
              "ext-curl": "*",
              "paypal/merchant-sdk-php":"v3.6.106"
            },
    "autoload": {
        "psr-0": {
            "PayPal\Service": "lib/",
            "PayPal\CoreComponentTypes": "lib/",
            "PayPal\EBLBaseComponents": "lib/",
            "PayPal\EnhancedDataTypes": "lib/",
            "PayPal\PayPalAPI": "lib/"
        }
    } 
}

当我运行composer update时,我得到的错误是:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package paypal/merchant-sdk-php 1.0.0 could not be found.
Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min
imum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
 problems.

我尝试安装另一个包,按钮管理器SDK。这需要我把"require"的最后一行改成"paypal/buttonmanager-sdk-php":"v3.6.106"

我不知道为什么它在商业SDK的情况下搜索1.0.0版本,并报告一个错误,它找不到它。

我是从这里的官方页面上得到指示的

请深入了解我的问题,如果需要,请询问任何其他信息。

在您的composer.json只保留所需的东西。如果你只创建一个需要通过composer安装的组件/包,你需要定义名称、描述、关键字等。

因此,如果您的项目需要任何包,只需保留包名和版本名。所以你的composer.json看起来像

{
    "require": {
         "paypal/merchant-sdk-php": "3.6.106"
    }
}

或者你可以通过composer require paypal/merchant-sdk-php并给出版本名。

相关内容

  • 没有找到相关文章

最新更新