2

I am trying to use the CI-Merchant library for codeigniter. I have installed this via a spark, as recommended. The documentation example that is on the ci-merchant.org website does not specifically show the spark being loaded, and therefor I am uncertain that I am using the system correctly. Can anyone look at the code below and see if they can spot what is going on. I wish to use "sagepay server" as my merchant in case that is helpful.

Regards and thanks in antipation

    $this->load->spark('ci-merchant-2.1.1');
    $this->load->library('merchant');
    $this->merchant->load('sagepay_servber');

    $settings = array(
        'vendor' => 'fluidbrandinglt',
        'test_mode' => TRUE,
        'simulator_mode' => FALSE
    );

    $this->merchant->initialize($settings);

    $params = array(
        'amount' => 100.00,
        'currency' => 'USD',
        'return_url' => 'https://www.example.com/checkout/payment_return/123',
        'cancel_url' => 'https://www.example.com/checkout'
    );

    $response = $this->merchant->purchase($params);

When I run the above code, I just get a blank screen with zero feedback about what is going on. I know that I have an encryption password which Sagepay provided me, but again I cannot see where this is configured or even if its relevant.

Adrian Macneil
  • 13,017
  • 5
  • 57
  • 70
James Stoddern
  • 397
  • 1
  • 5
  • 19

1 Answers1

1

You should change

$this->merchant->load('sagepay_servber');

with.

$this->merchant->load('sagepay_server');

There is a 'b' in your load statement. Small detail but it does give headaches.

Sanjit
  • 81
  • 2
  • 12
  • Please mark this as an answer if this solves you issue, If it doesn't then I can try to help you further. – Sanjit Sep 05 '13 at 07:44