yii2mod / yii2-cashier Goto Github PK
View Code? Open in Web Editor NEWYii2 Cashier provides an interface to Stripe's subscription billing services.
License: MIT License
Yii2 Cashier provides an interface to Stripe's subscription billing services.
License: MIT License
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
Your Createtable is missing the standard prefix {{%...
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?
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.
When I do this:
$user->newSubscription('main', 'monthly')->create($creditCardToken, [
'description' => 'Customer for [email protected]'
]);
and I show the invoices with your code, then the fields description and receipt_number are both empty
Hi!,
There is a tiny bug, the "exp_year" card attribute should be in the future , I've tested a 2032 value and all test are ok
https://github.com/yii2mod/yii2-cashier/blob/master/tests/CashierTest.php#L19
Many thanks!
Not able to set billing cycle while creating plans
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.
This package looks really good! Any plans for porting over Braintree support?
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');
}
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].
Any ideas?
$user = User::findOne(1);
$user->newSubscription('main', 'monthly')->create($creditCardToken);
Can anyone tell me how to get $creditCardToken ?
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
yii2-cashier/SubscriptionBuilder.php
Line 212 in ddd8cf8
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.