mollie / reseller-api

Reseller API voor het aanmaken en beheren van Mollie-accounts
https://www.mollie.com/
BSD 2-Clause "Simplified" License
13 stars 4 forks source link

Response of profiles() does not include profile identifier #10

Closed holtkamp closed 7 years ago

holtkamp commented 7 years ago

It seems the profile identifier is missing in the response of profiles():

<?xml version="1.0"?>
<response>
  <items>
    <profile>
      <name>Snoep.nl</name>
      <hash>9C696E36</hash>
      <website>http://snoep.nl/</website>
      <sector>6</sector>
      <category>5399</category>
      <verified>true</verified>
      <phone>0201234567</phone>
      <email>info@snoep.nl</email>
      <api_keys>
        <test>xxx</test>
        <live>xxx</live>
      </api_keys>
    </profile>
  </items>
</response> 

The Mollie Connect alternative does include this identifier (and also prefixes it with 'prf_', but that might not be required for this API)

holtkamp commented 7 years ago

Aah, I guess it is the hash field... But why is that called id in the Mollie Connect approach? https://www.mollie.com/en/docs/reference/profiles/list

I am not sure whether it would be able to fill profileId parameter of the Mollie Connect / OAuth approach using a profile created with the Reseller API...

Keep getting an 'Invalid profileId' exception...

UPDATE No, the hash field of the response of the Reseller API is not the ProfileId that should be used to create a Payment for Mollie Connect

The profileId that should be used can be derived from either:

Might be nice to have the pfl_XYZ profileId returned by the Reseller API as well...

holtkamp commented 7 years ago

@FaaPz is this on your radar? This lack of information currently breaks our intended workflow of using Mollie (Reseller) Accounts:

Create Mollie (Reseller) Account

Use Mollie (Reseller) Account When a payment needs to be created for a particular Mollie (Reseller) Account:

Currently a workaround might be to:

willemstuursma commented 7 years ago

Hi @holtkamp. The hash property was used for legacy APIs.

We'll add a new field for the API identifier (pfl...). I'll get back to you.

willemstuursma commented 7 years ago

We've added a new field <token> to the profile API response.

holtkamp commented 7 years ago

@willemstuursma great thanks!

Feedback, no criticism! I do have some concerns about consistency in 'naming' stuff though. In this case it is a profiletoken vs id. Same goes for the concept of profile, some (older?) parts of the documentation refers to it as website profile, others as payment profile and also profile in general is used. For me it does not matter that much, but for colleague developers looking at my code, they ask "what kind of profile are we browsing now?".

Just my 2 cents 😄 , maybe good to be uniform in all documentation / communication such as e-mails, etc Thanks again!