1

我第一次尝试在我的 laravel 应用程序的 composer.json 中添加一个包。

我试图添加这个包 paysafe https://github.com/paysafegroup/paysafe_sdk_php

我下载了 repo 并将其移动到 laravel 的“vendor”文件夹下

看来我需要指定我要安装的软件包的版本,但我没有这些信息......

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "4.2.*",
        "barryvdh/laravel-dompdf": "0.4.*",
        "mailgun/mailgun-php": "~1.7.2",
        "guzzlehttp/guzzle": "~4.0",
        "mikehaertl/phpwkhtmltopdf": "^2.0",
        "paysafe":"*"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev"
}

当我运行这个命令

php composer.phar require paysafe

我收到此错误消息:

  [InvalidArgumentException]                                                                                
  Could not find package paysafe at any version for your minimum-stability (dev). Check the package spelli  
  ng or your minimum-stability     
4

1 回答 1

4

我们最近更新了应该修复版本冲突问题的 SDK。请使用 PHP SDK 版本 1.0.1 再试一次!

一切顺利!

于 2017-06-05T13:34:34.670 回答