I am trying to integrate Paypal payment gateway in my website. I used codeigniter ci-merchant library. But i an not able to filled billing details in PayPal Checkout Pages Automatically. I passed all the details like below:
$params = array(
'amount' => 1,
'item' => 'myitem',
'description' => 'Your_item_description',
'currency' => $this->config->item('currency'),
'return_url' => base_url() . 'payment/payment_return',
'cancel_url' => base_url() . 'payment/cancel',
'first_name' => 'myname',
'last_name' => 'mynamelast',
'address1' => 'btm',
'address2' => 'bangare',
'city' => 'bangalore',
'state' => 'karnataka',
'zip' => '460078'
);
Is this the correct way? Please help.
Yes the correct way is below
and then use default setting
This will create a payment request with PayPal, and immediately redirect the customer away from your site. When the customer has completed their payment, they will be sent to the return URL you specified. Some payment gateways accept credit cards directly on your site (on-site gateways), and you will receive a $response immediately without the customer being redirected.
so then
print_r($response) ; die() ;
and check response.for details http://ci-merchant.org/
Handling the response
The $response object returned from either the purchase() or purchase_return() method will be an instance of the Merchant_response class. The response will have one of 5 statuses, representing the state the payment is in:
So here is full payment process of paypal express using Ci merchant
and if you want to use it with out redirect then use authorize.net or paypal pro.