mollie / laravel-mollie

Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite
https://www.mollie.com/
MIT License
322 stars 62 forks source link

Latest 2.20.0 causes 415 error, fixed by downgrading to 2.19.2 #212

Closed basepack closed 1 year ago

basepack commented 1 year ago

Current Behavior

Cannot do an API call via Mollie::api()->payments()->create([ your data ]);

Possible Solution

Downgrade to 2.19.2 works immediately.

Steps to Reproduce (for bugs)

Upgrade to 2.20.0 and call the Payments API.

Context

Full error:

Error executing API call (422: Unprocessable Entity): The webhook URL is invalid because it is unreachable from Mollie's point of view.. Field: webhookUrl. Documentation: https://docs.mollie.com/overview/handling-errors
RamonSmit commented 1 year ago

I second this, had the same issue. Already had a phone call with Mollie about this. I think its related to #202.

sandervanhooft commented 1 year ago

Hi,

I'll look into this later tonight.

If possible, can you share the actual code you're using so I can reproduce this properly? And confirm that it's throwing the 422 as reported in your ticket description, not a 415 as in the ticket title?

sandervanhooft commented 1 year ago

Cc @Skullbock

basepack commented 1 year ago

Hi,

I'll look into this later tonight.

If possible, can you share the actual code you're using so I can reproduce this properly? And confirm that it's throwing the 422 as reported in your ticket description, not a 415 as in the ticket title?

I have more of them 😜 ’’’ Mollie\Api\Exceptions\ApiException [2022-12-05T16:22:59+0100] Error executing API call (415: Unsupported Input Received): This API only accepts application/json or application/x-www-form-urlencoded or multipart/form-data as content-type.. Documentation: https://docs.mollie.com/overview/handling-errors ’’’

Skullbock commented 1 year ago

@basepack can you test the attached pr #213 ? Seems like it adds a double contentype header that makes mollie go nuts.

sandervanhooft commented 1 year ago

@basepack @Skullbock I am reverting to the former http client resolution in the MollieServiceProvider for now so I can get some sleep tonight :) . Will investigate later this week, including the proposed PR #213.

Thanks for reporting and helping out everyone, much appreciated.

sandervanhooft commented 1 year ago

https://github.com/mollie/laravel-mollie/releases/tag/v2.20.1

sandervanhooft commented 1 year ago

All good now!

v2.20.2 release notes