mollie / mollie-api-php

Mollie API client for PHP

Home Page:http://www.mollie.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OAuth2 in testmode not working for webhook POST requests

bedrijfsportaal opened this issue · comments

Specifications

mollie/mollie-api-php v2.40.2
mollie/oauth2-mollie-php v2.5.0

Describe the issue

I've been testing the webhook POST request to check the payment, unfortunately i'm facing an issue.
Keep receiving the error shown as below, the payment and webhook are both checked with the same access_{token}.

ERROR - 2022-03-16 19:22:03 --> [2022-03-16T19:22:03+0100] Error executing API call (404: Not Found): Payment tr_gd7kcwnJyk exists, but the wrong mode is used. Try switching live / test API keys.. Documentation: https://docs.mollie.com/overview/handling-errors

  1. The testmode on payments->create() is true
  2. The profileId has been set to the correct profile (our own while testing).
  3. Created test access token is exactly the same on $mollie->setAccessToken() creating and webhook

Cannot find any related issues or solution on this matter, someone here to push me in the right direction?

Hi @bedrijfsportaal ,

Can you share some code sample to reproduce this issue?

Feeling like a total retard right now, but the repo from NodeJS pushed me in some direction.
Missed the array part on $mollie->payments->get('{tr_id}', array( 'testmode' => true ));

Seems to push the correct data and information now 👍

Ha! No problem.

Thanks for following up.

Enjoy!