amzn / amazon-pay-sdk-php

Amazon Pay PHP SDK
https://pay.amazon.com/documentation
Apache License 2.0
208 stars 92 forks source link

amzn/amazon-pay-sdk-php not directly installable by composer #42

Open pdbreen opened 7 years ago

pdbreen commented 7 years ago

It seems the package rename has left composer confused - perhaps a new packagist entry is needed?

$ composer require amzn/amazon-pay-sdk-php

  [InvalidArgumentException]
  Could not find package amzn/amazon-pay-sdk-php at any version for your mini
  mum-stability (stable). Check the package spelling or your minimum-stability

As a work around, I was able to install after adding a custom repository to let composer know where to look:

    "repositories": [{
        "type": "vcs",
        "url": "https://github.com/amzn/amazon-pay-sdk-php.git"
    }]
andrelopez commented 7 years ago

Bug confirmed, thanks @pdbreen for the tip

capellidev commented 7 years ago

@pdbreen , can you please help me, where to put the code in composer.json file you have written above? I have written like this,

"repositories": [{ "type": "vcs", "url": "https://github.com/amzn/amazon-pay-sdk-php.git" }], "require": { "php": ">=5.6.4", "laravel/framework": "5.4.", "laravel/tinker": "~1.0", "razorpay/razorpay": "1." }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.7" }

but still not getting the amazon package in my project.

pdbreen commented 7 years ago

@capellidev with the repository added, you should now be able to run composer require amzn/amazon-pay-sdk-php and it will find the package. Or, you can directly add a new entry to the require section and then run composer update.

"require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.",
        "laravel/tinker": "~1.0",
        "razorpay/razorpay": "1."
        "amzn/amazon-pay-sdk-php": "^3.0.0",
},