Giter Site home page Giter Site logo

faustbrian-archives / laravel-paddle Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 2.0 51 KB

DEPRECATED - USE https://github.com/laravel/cashier-paddle

License: Mozilla Public License 2.0

PHP 100.00%
php laravel e-commerce paddle saas products subscriptions checkout

laravel-paddle's Introduction

Laravel Paddle

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

This package was created by, and is maintained by Brian Faust, and provides a Paddle integration for Laravel.

Installation

composer require kodekeep/laravel-paddle

Usage

See our tests for usage examples.

Billable

If you are planning to use the Billable trait you'll need to use the following migration to add the necessary columns to the table of your billabled model.

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Schema;

class AddPaddleToUsers extends Migration
{
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->unsignedBigInteger('paddle_id')->nullable()->index();
            $table->unsignedBigInteger('paddle_subscription_id')->nullable()->index();
            $table->unsignedBigInteger('paddle_subscription_plan_id')->nullable()->index();
            $table->timestamp('trial_ends_at')->nullable();
            $table->timestamp('grace_period_ends_at')->nullable();
        });
    }

    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('paddle_id');
            $table->dropColumn('paddle_subscription_id');
            $table->dropColumn('paddle_subscription_plan_id');
            $table->dropColumn('trial_ends_at');
            $table->dropColumn('grace_period_ends_at');
        });
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

Support Us

We invest a lot of resources into creating and maintaining our packages. You can support us and the development through GitHub Sponsors.

License

Laravel Paddle is an open-sourced software licensed under the MPL-2.0.

laravel-paddle's People

Contributors

faustbrian avatar petericebear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-paddle's Issues

Laravel 7 integration hangs when adding the package

With a Laravel 7 app I try to add the package with:
composer require kodekeep/laravel-paddle

Then I get this error:
image

I think the dependency needs to be updated of the sdk. Can you add that and trigger a new version?

When cancelling a subscription

Hi,

I saw this listener and when someone is cancelling the subscription the plan_id is also removed from the model, in this case the subscription and plan is removed and you will only have the on_grace_period date but the plan is removed.

Maybe it is better to only set the grace_period_ends_at with a value?
Then all the other information can be left, and after the grace_period_ends_at date with a command remove those lines to null just like the clear due trials command.

https://github.com/kodekeep/laravel-paddle/blob/7b1c15d53a2811d23ae403f71198a065e9d4136a/src/Billing/Listeners/DeleteSubscriptionInformation.php#L29-L30

Just ventilating here about the possibilties.

Greetings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.