cashier-mollie | Laravel Cashier provides an expressive , fluent interface | Web Framework library
kandi X-RAY | cashier-mollie Summary
kandi X-RAY | cashier-mollie Summary
Laravel Cashier provides an expressive, fluent interface to subscriptions using Mollie's billing services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Process the payment
- Restart a new billing cycle .
- Populate a plan .
- Create an action collection .
- Handle a webhook request
- Get tax details .
- Execute the subscription
- Redeem a coupon .
- Get the discount order items .
- Add an amount for the owner .
cashier-mollie Key Features
cashier-mollie Examples and Code Snippets
Community Discussions
Trending Discussions on cashier-mollie
QUESTION
Is it possible to override a package provided event?
For example
Package "laravel/cashier-mollie" which is installed via composer into the vendor dir has an event laravel\cashier-mollie\src\Events\OrderPaymentFailed
What I want to do is update a specific field in my database when this event is fired.
Any ideas?
...ANSWER
Answered 2020-Jan-06 at 16:13You can add your own Listener for the event in app/Providers/EventServiceProvider.php
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cashier-mollie
Once you have pulled in the package:.
Run php artisan cashier:install.
Add these fields to your billable model's migration (typically the default "create_user_table" migration): $table->string('mollie_customer_id')->nullable(); $table->string('mollie_mandate_id')->nullable(); $table->decimal('tax_percentage', 6, 4)->default(0); // optional $table->dateTime('trial_ends_at')->nullable(); // optional $table->text('extra_billing_information')->nullable(); // optional
Run the migrations: php artisan migrate
Ensure you have properly configured the MOLLIE_KEY in your .env file. You can obtain an API key from the Mollie dashboard: MOLLIE_KEY="test_xxxxxxxxxxxxxxxxxxxxxx"
Prepare the configuration files: configure at least one subscription plan in config/cashier_plans.php. in config/cashier_coupons.php you can manage any coupons. By default an example coupon is enabled. Consider disabling it before deploying to production. the base configuration is in config/cashier. Be careful while modifying this, in most cases you will not need to.
Prepare the billable model (typically the default Laravel User model): Add the Laravel\Cashier\Billable trait. Optionally, override the method mollieCustomerFields() to configure what billable model fields are stored while creating the Mollie Customer. Out of the box the mollieCustomerFields() method uses the default Laravel User model fields: public function mollieCustomerFields() { return [ 'email' => $this->email, 'name' => $this->name, ]; } Learn more about storing data on the Mollie Customer here. Implement Laravel\Cashier\Order\Contracts\ProvidesInvoiceInformation interface. For example: /** * Get the receiver information for the invoice. * Typically includes the name and some sort of (E-mail/physical) address. * * @return array An array of strings */ public function getInvoiceInformation() { return [$this->name, $this->email]; } /** * Get additional information to be displayed on the invoice. Typically a note provided by the customer. * * @return string|null */ public function getExtraBillingInformation() { return null; }
Schedule a periodic job to execute Cashier::run(). $schedule->command('cashier:run') ->daily() // run as often as you like (Daily, monthly, every minute, ...) ->withoutOverlapping(); // make sure to include this
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page