Giter VIP home page Giter VIP logo

yii2-cashier's People

Contributors

kmindi avatar raimon-segura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-cashier's Issues

Payment Success Webhook

How can I add custom code when the payment / subscription payment has been successfully completed ?
I need to update some RBAC settings on successful completion

Redirect to Stripe checkout to not manage the credit card data

Is it possible to use this module to create a subscription where the flow is redirect to Stripe so user put the credit card in Stripe?

I see the method:
$user->newSubscription('main', 'monthly')->create($creditCardToken);

but I don't want to "host" the credit card input data, so I'd like to create the subscription session id, so I can redirect user to stripe checkout as shown in https://stripe.com/docs/billing/subscriptions/checkout

Is this possible?

Issue with $subscription->cancel

Hi author, thanks for this cool contribution to work with Stripe. It's work for me!
But I have a little issue in file yii2mod/yii2-cashier/models/SubscriptionModel.php line 328 in function cancel():

$subscription->cancel(['at_period_end' => true]);

I get an error that "at_period_end is not a valid param". I just change to $subscription->cancel(); And it work.

Support for SEPA payments

Apparently there is no support for SEPA at the moment.
It was proposed for the laravel cashier as well here: laravel/cashier-stripe#893

At least in germany it is not very common to pay via credit card but usually per SEPA direct debit.

Braintree support

This package looks really good! Any plans for porting over Braintree support?

Migrations must have table prefix

Migrations doesn't consider table prefix if exist, should be changed to this

{{%subscription}} and {{%user}}

        $this->createTable('{{%subscription}}', [
            'id' => $this->primaryKey(),
            'userId' => $this->integer()->notNull(),
            'name' => $this->string()->notNull(),
            'stripeId' => $this->string()->notNull(),
            'stripePlan' => $this->string()->notNull(),
            'quantity' => $this->integer()->notNull(),
            'trialEndAt' => $this->timestamp()->null(),
            'endAt' => $this->timestamp()->null(),
            'createdAt' => $this->timestamp()->null(),
            'updatedAt' => $this->timestamp()->null(),
        ], $tableOptions);

        $this->addColumn('{{%user}}', 'stripeId', $this->string());
        $this->addColumn('{{%user}}', 'cardBrand', $this->string());
        $this->addColumn('{{%user}}', 'cardLastFour', $this->string());
        $this->addColumn('{{%user}}', 'trialEndAt', $this->timestamp()->null());
    }

    public function down()
    {
        $this->dropTable('subscription');

        $this->dropColumn('{{%user}}', 'stripeId');
        $this->dropColumn('{{%user}}', 'cardBrand');
        $this->dropColumn('{{%user}}', 'cardLastFour');
        $this->dropColumn('{{%user}}', 'trialEndAt');
    }

Stripe Version Issue

Problem 1
- Conclusion: don't install yii2mod/yii2-cashier 2.0.0
- Conclusion: don't install yii2mod/yii2-cashier 1.6
- Conclusion: don't install yii2mod/yii2-cashier 1.5
- Conclusion: don't install yii2mod/yii2-cashier 1.4
- Conclusion: don't install yii2mod/yii2-cashier 1.3
- Conclusion: don't install yii2mod/yii2-cashier 1.2
- Conclusion: don't install yii2mod/yii2-cashier 1.1
- Conclusion: don't install yii2mod/yii2-cashier 1.0.2
- Conclusion: don't install yii2mod/yii2-cashier 1.0.1
- Conclusion: don't install stripe/stripe-php v3.23.0
- Installation request for yii2mod/yii2-cashier * -> satisfiable by yii2mod/yii2-cashier[1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0.0].
- Conclusion: remove stripe/stripe-php v6.41.0
- yii2mod/yii2-cashier 1.0 requires stripe/stripe-php ~3.0 -> satisfiable by stripe/stripe-php[v3.0.0, v3.1.0, v3.10.0, v3.10.1, v3.11.0, v3.12.0, v3.12.1, v3.13.0, v3.14.0, v3.14.1, v3.14.2, v3.14.3, v3.15.0, v3.16.0, v3.17.0, v3.17.1, v3.18.0, v3.19.0, v3.2.0, v3.20.0, v3.21.0, v3.22.0, v3.23.0, v3.3.0, v3.4.0, v3.5.0, v3.6.0, v3.7.0, v3.7.1, v3.8.0, v3.9.0, v3.9.1, v3.9.2].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.0.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.1.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.10.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.10.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.11.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.12.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.12.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.13.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.14.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.14.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.14.2].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.14.3].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.15.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.16.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.17.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.17.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.18.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.19.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.2.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.20.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.21.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.22.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.3.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.4.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.5.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.6.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.7.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.7.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.8.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.9.0].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.9.1].
- Can only install one of: stripe/stripe-php[v6.41.0, v3.9.2].
- Installation request for stripe/stripe-php (installed at v6.41.0) -> satisfiable by stripe/stripe-php[v6.41.0].

how to get $creditCardToken

$user = User::findOne(1);

$user->newSubscription('main', 'monthly')->create($creditCardToken);

Can anyone tell me how to get $creditCardToken ?

Unable to subscribe to plan when the customer is deleted from stripe dashboard.

Hi,

Thanks for the extension. Facing an issue when the customer is deleted from stripe dashboard. Receiving the following error when I try to create a new subscribe as it is not reflected in our database:
Call to a member function create() on null in /home/alkurnw1/public_html/clients/service-for-you-app/vendor/yii2mod/yii2-cashier/SubscriptionBuilder.php:179

We need to check the customer exist at stripe dashboard in getStripeCustomer function at this line

$customer = $this->user->createAsStripeCustomer(

Stripe update required

Stripe depreciated previous versions of API. Now they aren't using Identifier to subscribe plan. New accounts are required to have latest version of API. When we can expect new version of your module?

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.