GithubHelp home page GithubHelp logo

sandervanhooft / laravel-payable-redirect-mollie Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 3.0 43 KB

Associate Mollie payments with Eloquent models

Home Page: https://www.sandervanhooft.com/blog/laravel/easy-mollie-payments-with-laravel/

License: MIT License

PHP 100.00%
mollie laravel-5-package laravel eloquent payments

laravel-payable-redirect-mollie's People

Contributors

sandervanhooft avatar scrutinizer-auto-fixer avatar tomodutch avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

laravel-payable-redirect-mollie's Issues

PaymentUpdated event not emitted

When Mollie fires the webhook, no PaymentUpdated event is fired. I am not sure we are doing something wrong. Maybe the event is supposed the fire when a database update is made on the Payment model. Because the PaymentUpdated event is not fired, the different event types depending on the payment status are not fired.

Possible implementation

I have solved the problem by adding a line to the webhook controller:

    public function handle(Request $request)
    {
        $payment = Payment::where('gateway_payment_reference', $request->id)->firstOrFail();
        $paymentGateway = new $payment->gateway_name;
        $paymentGateway->fetchUpdateFor($payment);
        event(new PaymentUpdated($payment));
        return response()->json(null, 200);
    }

How should the event normally be emitted.

Your environment

  • Laravel 5.6
  • PHP 7.2

Is it possible to send a payment method through laravel-payable-redirect?

The Mollie supports skipping the payment method screen if a payment method is sent with the payment. I'd like to do so for administrative purposes.

Detailed description

Can I do this? My Laravel is a platform that has to invoice the transaction costs to its users, this would be a lot easier if I knew what payment method was used.

Context

This is useful for anyone using this package in a platform-like e-commerce setting

Possible implementation

Adding a parameter to the payment

Not downloading/installing using composer

Detailed description

When I use composer

$ composer require sander-van-hooft/laravel-payable-redirect-mollie 

Composer tells me there is nothing to update/install..

Context

It would be nice to be able to install the package ๐Ÿ˜„

Possible implementation

Not obligatory, but suggest an idea for implementing addition or change.

Your environment

  • Homestead

Please update for Laravel 6

Can this be updated for Laravel 6? Or are there better ways / packages now? Looking for exactly a solution like this.

PS: Dear Sander, is it possible to get in touch with you?

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.