laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.
https://laravel.com/docs/cashier-paddle
MIT License
239 stars 57 forks source link

Unable to find requested product #7

Closed Benoit1980 closed 4 years ago

Benoit1980 commented 4 years ago
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^1.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/cashier-paddle": "^1.0@beta",
        "laravel/framework": "^7.0",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^2.0"

Description:

I cannot get the test working form the doc

Steps To Reproduce:

I added this in my blade header:

  @paddleJS
</head>

This in my home.blade.php

                <x-paddle-button :url="$payLink" class="w-8 h-4">
                    Subscribe
                </x-paddle-button>

My home controller:

    public function index()
    {
        $user = User::find(1);

$payLink = $user->newSubscription('default', 'premium')
    ->returnTo(route('home'))
    ->create();
    }

I get this:

Laravel\Paddle\Exceptions\PaddleException
Unable to find requested product

So I thought first that I had to create manually the product which I did in my paddle account and called it "premium".

I have also set the API details in the .ENV . I checked my key details 3 times and they are correct.

PADDLE_VENDOR_ID=
PADDLE_VENDOR_AUTH_CODE=
PADDLE_PUBLIC_KEY=""

Any idea why this does not give me any output please?

Thank you.

driesvints commented 4 years ago

You seem to be using some string called "premium" instead of the product ID.

driesvints commented 4 years ago

I just saw the docs are incorrect. I'll try to update these tomorrow. Thanks for testing!

Benoit1980 commented 4 years ago

Thank you so much :-))))))

driesvints commented 4 years ago

I've sent in a PR here: https://github.com/laravel/docs/pull/6108