I am using ci-merchant library and integrated it succesfully and also works for paypal account owner user.But dont know how to processs for user who dont have paypal acc and wants to pay via credit or debit card on my website only*(without redirect to paypal)* any idea????abt that.....this is the code i use for the normal paypal payment in my controller and works good as well..
$this->load->library('merchant');
$this->merchant->load('paypal_express');
$settings = $this->merchant->default_settings();
$settings = array(
'username' => 'takeout_api1.rest.com',
'password' => '1369227981',
'signature' => 'AnOQDpMvzNQqHN5u7vb9BKLaKYLoALq6R0g3ohOwD4RQgO0DQDI5l7V4',
'test_mode' => true,
);
$this->merchant->initialize($settings);
$params = array(
'amount' => 1500.00,
'currency' => 'CAD',
'return_url' => 'http://192.168.1.7/takeout/order_detail/test',
'cancel_url' => 'http://192.168.1.7/takeout/order_detail/test');
$response = $this->merchant->purchase($params);
function test()
{
$settings = array(
'username' => 'takeout_api1.rest.com',
'password' => '1369227981',
'signature' => 'AnOQDpMvzNQqHN5u7vb9BKLaKYLoALq6R0g3ohOwD4RQgO0DQDI5l7V4',
'test_mode' => true);
$this->merchant->initialize($settings);
$params = array(
'amount' => 1500.00,
'currency' => 'CAD',
'return_url' => 'http://192.168.1.7/takeout/order_detail/test',
'cancel_url' => 'http://192.168.1.7/takeout/order_detail/test');
$response = $this->merchant->purchase_return($params);
if ($response->success())
{
// mark order as complete
echo "yo";
exit;
}
else
{
$message = $response->message();
echo('Error processing payment: ' . $message);
exit;
}
}