Take the 2-minute tour ×

I'm trying to use the CI-Merchant library for integrating Paypal Pro (Direct Payment) and I am lost..

I have setup a UK sandbox (both a seller account preconfigured with paypal pro, and a buyer account with the info below ($params array)

Here is the response I'm getting (status failed, no message) along with the $params array I am using:

Merchant_response Object
    [_status:protected] => failed
    [_message:protected] => 
    [_reference:protected] => 
    [_data:protected] => 
    [_redirect_url:protected] => 
    [_redirect_method:protected] => GET
    [_redirect_message:protected] => 
    [_redirect_data:protected] => 
    [card_type] => Visa
    [card_no] => 4269072658337891
    [first_name] => Buyer
    [last_name] => One
    [address1] => 1 Main Terrace
    [city] => Wolverhampton
    [region] => West Midlands
    [postcode] => W12 4LQ
    [amount] => 10
    [currency] => GBP
    [country] => UK

And here is the code:


$settings = array(
  'username' => '***',
 'password' => '***',
 'signature' => '***',
 'test_mode' => true);


//params array is set through a form submit.
$response = $this->merchant->purchase($params);
echo '<pre>';

Please let me know how to to debug this!

Thank you, Georges

share|improve this question
Please remember to write up the solution as an answer if you have fixed this yourself. Was it to do with not using SSL on your payment page? –  Adrian Macneil Jan 29 '13 at 15:28
I have not solved this issue. I suspect it might have been due to no SSL certificate available at the time, but I had to resort to using Paypal's sample code to test without a certificate first. May I suggest adding more detailed information in the merchant response as opposed to just the status being set to "Failed" in that instance, and also have the option to do insecure tests (at least in sandbox mode) in the future! Seems like a great library, but was just not suited for my purposes at the time –  Georges Sabbagh Feb 19 '13 at 15:20
@GeorgesSabbagh What value should we give to signature attribute of $settings array? –  V15HM4Y Jul 5 '13 at 7:51

1 Answer 1

after this code


you need to initialize

$settings = $this->merchant->default_settings();

and bingo

share|improve this answer

Your Answer


