Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Comma-separated list of first payment method in config #204

Open
mmachatschek opened this issue May 5, 2020 · 4 comments
Open

Comma-separated list of first payment method in config #204

mmachatschek opened this issue May 5, 2020 · 4 comments

Comments

@mmachatschek
Copy link
Contributor

It is not possible to add a comma-separated list for the first payment method in the config. The comment says it is possible but not handled correctly in the code.

[
        /**
         * A comma-separated list of allowed Mollie payment methods for the first payment. Make sure the methods are
         * enabled in the Mollie dashboard. Set to NULL to let Mollie handle this for you. Can be overridden per plan.
         * @example 'ideal,creditcard'
         */
        'method' => null,
]

Should the comment be updated or the code adapted accordingly?

@sandervanhooft
Copy link
Contributor

Can you try passing an array?

@mmachatschek
Copy link
Contributor Author

mmachatschek commented May 5, 2020

@sandervanhooft The plan model only accepts a string as payment method. Passing a array will lead in a PHP error.

    /**
     * @param string $firstPaymentMethod
     * @return $this
     */
    public function setFirstPaymentMethod(?string $firstPaymentMethod)
    {
        $this->firstPaymentMethod = $firstPaymentMethod;

        return $this;
    }

@chris-redbeed
Copy link

I create a small PR for this: #210

@sandervanhooft
Copy link
Contributor

Thanks @chris-redbeed !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants