laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

Home Page:https://laravel.com/docs/cashier-paddle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single Charge Error 400 The checkout id must be a valid checkout id from local dev only

digitalsailweb opened this issue · comments

  • Cashier Paddle Version: v1.4.6
  • Laravel Version: v8.58.0
  • PHP Version: 8.0.3
  • Database Driver & Version:

Description:

I am trying to make single charge using sandbox credentials from paddle using localhost or laravel valet domain locally. When I try to click pay button I got error 400 . When I inspect the error inside network tab in chrome the error shows :
The checkout id must be a valid checkout id.

but when make the site accessible from internet using for example using
valet share . The charge works fine .. it does not work locally which is weird to me .

Steps To Reproduce:

the code is very


      $payLink = Auth::user()->charge(10.99, "Paddle Course");

        return view("billing", [
            'payLink' => $payLink
        ]);

inside view

 </x-paddle-button>
                <a href="{{$payLink}}" class="px-2 py-2 rouned text-white bg-blue-600">Buy</a>
               
                </div>

I am not sure if i missed something here ..

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

Hi @driesvints I think to me it is a bug .

also fyi , i did post the same thing in discord channel https://discord.com/channels/297040613688475649/731885496946524181/885613470253477939

for couple of days with no answer.

Also when I use normal api call to get paylink without cashier-paddle package it works locally ..

so thats why I think it is a bug or I did something wrong. please reopen the case.

thanks

You can't use a paylink in a view like that on an a tag. Always use a paddle button component or a manually rendered link like in https://laravel.com/docs/8.x/cashier-paddle#manually-rendering-pay-links

You can't use a paylink in a view like that on an a tag. Always use a paddle button component or a manually rendered link like in https://laravel.com/docs/8.x/cashier-paddle#manually-rendering-pay-links

I did same thing
<a href="#!" class="ml-4 paddle_button" data-override="{{ $payLink }}"> Paddle Checkout </a>

I got same error

@digitalsailweb please try a support channel. I'm sure there's something amis with your Paddle setup or app.

@digitalsailweb please try a support channel. I'm sure there's something amis with your Paddle setup or app.

I can do that @driesvints but I wonder why it is not working and I followed same steps in the docs !! are u sure nothing wrong with package ?