laravel-cashier-mollie: Some Payment Methods don't work with LIVE API key, but do with TEST API key
While implementing a Donation page for our client, we ran into an issue.
While using the test-api-key, we were able to create a payment checkout process that brought us to a Mollie page where we could choose on of the two configured payment methods (configured in Mollie dashboard, “Bancontact” and “Visa”). But when using the live-api-key, the mollie checkout url skips the payment selection, and directly goes to the payment form for “Visa”.
This happens for the one-time payments, as well as for the subscriptions:
private function handleSubscription(Donation $donation)
{
$plan = Plan::firstOrCreate(
['amount' => $this->amount],
[
'working_title' => $this->amount,
'description' => "ITG Donation {$this->amount}",
'interval' => 1,
'period' => 'month',
'active' => false,
]
);
$result = $donation->newSubscriptionViaMollieCheckout("subscription {$this->amount}", $plan->working_title)->create();
return redirect($result->getTargetUrl()); // Redirect to Mollie checkout
}
private function handleOneTimePayment(Donation $donation)
{
$tax = $this->vat_number ? 0 : 21;
$item = new \Laravel\Cashier\Charge\ChargeItemBuilder($donation);
$item->unitPrice(money($this->amount * 100, 'EUR'));
$item->taxPercentage($tax);
$item->description('One Time Donation');
$chargeItem = $item->make();
$result = $donation->newCharge()
->addItem($chargeItem)
->create();
return redirect($result->getTargetUrl()); // Redirect to Mollie checkout
}
Is there a problem with our code, with the package? We are clueless as Mollie support assures us that the Web Profile and Payments configuration is set up correctly.
Thanks in advance.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19
Sorry for the late answer… I forgot to post a response here to let you know that the issue was resolved with the suggested solution!
Thanks all
Hi @Robert4mollie !
Thanks alot! I’ll let our client know that he should enable this. (as it is their account).
I’ll keep you posted here if it has resolved our issue.
Thanks both for the support!