mollie / mollie-api-php

Mollie API client for PHP
http://www.mollie.com
BSD 2-Clause "Simplified" License
550 stars 189 forks source link

Payment method mistercash should be bancontact #187

Closed mathijsvdb closed 6 years ago

mathijsvdb commented 6 years ago

In the PaymentMethod class, mistercash should be updated to bancontact.

    /**
     * Bancontact, formerly known as Mister Cash.
     *
     * @link https://www.mollie.com/mistercash
     */
    const MISTERCASH = "mistercash";

My payment call always returned an error, so i went exploring the API. Seems the mistercash id has been updated to bancontact

ndijkstra commented 6 years ago

Hi! In the latest version we've updated it to bancontact: https://github.com/mollie/mollie-api-php/blob/master/src/Types/PaymentMethod.php

holtkamp commented 5 years ago

Can this also be backported for the v1 branch?

https://github.com/mollie/mollie-api-php/blob/ed1683b244676360d951c7c5beefe02782cc20eb/src/Mollie/API/Object/Method.php#L94

Since changing it is probably a breaking change, it might be better to simply add the BANCONTACT constant?

Currently no Bancontact Payments can be created using the v1 branch of the API Client 🤔 , it results in:

Error executing API call (request): The payment method is invalid.

A workaround is to use the "old" MISTERCASH constant / "mistercash" value.

@ndijkstra what is the "official" advise on this subject?

holtkamp commented 5 years ago

@ndijkstra and @willemstuursma did https://github.com/mollie/mollie-api-php/issues/187#issuecomment-428347741 reach your "radar" ? 😃

willemstuursma commented 5 years ago

@holtkamp In v1, you have to use the mistercash value to create Bancontact payments.

You can also retrieve this value from the v1 methods API.

I don't understand why you want to use bancontact for this?

holtkamp commented 5 years ago

mmm, well, the company / payment method "Mistercash" has been "Bancontact" for some time now:

In april 2016 onderging Bancontact een rebranding waarbij zustermerk Mister Cash definitief uit de bedrijfsnaam werd verwijderd. Ook het logo werd geüpdatet.

Internally we use identifiers for the PaymentMethods as provided by the various PaymentServiceProviders (like Mollie) to populate the requests that are dispatched to their APIs.

I thought it was kind of awkward to present a PaymentMethod as "Bancontact" to our customers, with a Bancontact logo while using mistercash as identifier... But apparently it is not as trivial as I thought? 😄

willemstuursma commented 5 years ago

@holtkamp if you have some internal identifiers, you would have mapping from your internal identifier to the PSP's identifier regardless right?

In v2 this has been resolved so you could also upgrade your connection to that.

holtkamp commented 5 years ago

Indeed, and I would like these identifiers to make sense...

I expected this would have been simple to backport Bancontact "support" for the v1 folks out here by simply adding a constant to https://github.com/mollie/mollie-api-php/blob/ed1683b244676360d951c7c5beefe02782cc20eb/src/Mollie/API/Object/Method.php

const BANCONTACT = self::MISTERCASH;

nice-to-have, not a biggy though 👍