Viincenttt / MollieApi

This project allows you to easily add the Mollie payment provider to your application.
MIT License
147 stars 85 forks source link

Added Routing Property to the PaymentRequest for Split Payment Support #290

Closed DiedrikDM closed 1 year ago

DiedrikDM commented 1 year ago

@Viincenttt I added the routing property to support Split Payments. #288

I ran the existing unit tests and integration tests regarding payments, and the most significant (in my eyes) succeeded as far as I can tell. However I didn't create any extra tests and I don't have support yet for all payment methods on my Mollie account. You are free to use the PR as you wish. Personally I need to use this feature (Split Payments) in my own solution and will use simple inheritance as a temp solution to add the behavior to Payment Requests.

Viincenttt commented 1 year ago

Hi @DiedrikDM ,

Thanks for the PR. I've added a single comment. I'll see if I can get access to the split payment functionality so I can test it myself. It is also possible to retrieve the PaymentRouting details when retrieving a payment? If so, it might make sense to have a PaymentRequestRouting and a PaymentResponseRouting object, since they can have different properties.

If you don't have any further time to add this, no worries, I can also merge this PR and add some things myself as soon as I get the access.

Kind regards, Vincent

DiedrikDM commented 1 year ago

Hi Vincent,

I just noticed you get the response back, when a user creates the payment with Mollie and that should include the routing information. I didn't find it in other places in the documentation (yet) but I'm still pretty new to using Mollie, so I could have missed it.

I'll add the extra properties for the response object and I'll get back to you!

Best regards, Diedrik

DiedrikDM commented 1 year ago

I added the properties as mentioned here in a response object on the split payments documentation: https://docs.mollie.com/connect/splitting-payments#routing-part-of-a-payment-to-a-connected-account

Viincenttt commented 1 year ago

Very nice! You are the man! :)