gpt4 book ai didi

php - 在 Paypal 上安装 Merchant SDK for Express Checkout API

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

如标题所示,我正在尝试在 Paypal 上安装 Merchant SDK for 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"这奏效了。

我不知道为什么搜索1.0.0版本的商户SDK会报找不到的错误。

我正在接受官方页面的说明 here

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

最佳答案

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

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

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

或者,您可以通过 composer require paypal/merchant-sdk-php 并提供版本名称。

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

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