Reputation: 417
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.
Upvotes: 2
Views: 467
Reputation: 81
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.
Upvotes: 1