I am trying to apply mollie payment gateway in codeIgniter using ref of https://github.com/mollie/mollie-api-php . But it is not working in it. I have already used this library in laravel which is working over there. when I tried to use in codeIgniter, it directly redirect me to redirectUrl and when I check in mollie payment dashboard, there is not payment. I can't understand what am I doing wrong. Can anyone help me? I have used this in composer.json and update the composer
"mollie/mollie-api-php": "^2.0"
In my controller file,
class Mollie_test extends CI_Controller {
public function make_payment()
{
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_key");
$payment = $mollie->payments->create([
'amount' => [
'currency' => 'EUR',
'value' => '10.00'
],
'description' => 'tesst',
'redirectUrl' => redirect('mollie_test/success')
]);
}
public function success()
{
echo 'payment process completed';
}
}
This may help you
https://github.com/mollie/mollie-api-php
the $payment->getCheckoutUrl() object return to you checkout url , you need to redirect this url