cashier-mollie
cashier-mollie copied to clipboard
Comma-separated list of first payment method in config
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?
Can you try passing an array?
@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;
}
I create a small PR for this: https://github.com/laravel/cashier-mollie/pull/210
Thanks @chris-redbeed !