mollie / laravel-mollie

Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite
https://www.mollie.com/
MIT License
322 stars 62 forks source link

I am unable to create first payment for customer created #232

Closed kirti-u closed 1 year ago

kirti-u commented 1 year ago

Hello, I have implemented the this for my laravel project. This is working for regular payment. but not working when i created it for 'first payment' for the customer i created. I have successfully created customer using following:

$customer = Mollie::api()->customers->create([ 'name' => $user->full_name, 'email' => $user->email, ]);

$order_no = 'ABC'; $mollie_customer_id = $customer->id; but getting error on following code:

$payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'EUR', 'value' => '25.00', ], 'customerId' => $mollie_customer_id, 'sequenceType' => 'first', 'description' => 'My Initial Payment', 'redirectUrl' => route('orders.payment', ['locale'=>getLocale(), 'order_no'=>$order_no]), 'webhookUrl' => route('orders.mollie_webhook'), ]); customer_first_payment

I have attached the screenshot of error also. when i comment 'webhookUrl' line, it gives error on 'redirectUrl' and so on. can somebody help please?

Thanks.

sandervanhooft commented 1 year ago

Hi,

Can you double check that:

Payment methods pending review cannot be used in production until verified, however these are immediately available in test mode once switched on in the dashboard.

kirti-u commented 1 year ago

Thanks for reply. This is test mode i am working on. Only iDEAL payment method is enabled. I have just enabled 'Cards' and now it is working!