gpt4 book ai didi

php - Merchant SDK for Express Checkout API 在 Paypal 上的 Composer 问题

转载 作者:太空宇宙 更新时间:2023-11-03 16:29:08 25 4
gpt4 key购买 nike

我想集成一种方法,访客也可以通过该方法在我的网站上进行付款。所以,我正在实现这个 Paypal 的SDK。需要安装 compser 并运行它以获取依赖项。所以,我运行了这个命令来在 samples 文件夹中安装 composer.phar 文件

curl -sS https://getcomposer.org/installer | php -- --install-dir=/var/www/html/app/paypaltest/samples

然后为了安装 Composer ,我运行了这个命令:

php composer.phar install

但是它显示错误为

Loading composer repositories with package information
Installing 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 minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

不确定为什么当我明确定义版本号时出现版本 1.0.0 的错误,即 v3.8.107这是我正在使用的 composer.json 文件。任何人都可以帮助我知道问题是什么以及为什么我不能正确安装 Composer 。我错过了什么吗?

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

最佳答案

在您的 composer.json 中尝试以下内容:

{
"require": {
"paypal/merchant-sdk-php": "v3.8.107"
}
}

关于php - Merchant SDK for Express Checkout API 在 Paypal 上的 Composer 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27177158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com