07-14-2011, 09:45 PM
[eluser]Unknown[/eluser]
I am trying to code for PayPoint's (formally SecPay) API within CodeIgniter. I am following along their sample code here: http://www.paypoint.net/support/gateway/...mlrpc-php/
Here is what I have so far.
controllers/paypoint.php
But the output is always: 'No data received from server.'
Am I doing something wrong?
I am trying to code for PayPoint's (formally SecPay) API within CodeIgniter. I am following along their sample code here: http://www.paypoint.net/support/gateway/...mlrpc-php/
Here is what I have so far.
controllers/paypoint.php
Code:
<?php
Class Paypoint extends CI_Controller {
function __construct() {
parent::__construct();
// Load default libraries
$this->load->library('xmlrpc');
}
function index () {
$this->xmlrpc->server('https://www.secpay.com/secxmlrpc/make_call', 443);
$this->xmlrpc->timeout(60);
$this->xmlrpc->method('SECVPN.validateCardFull');
$request = array(
array('secpay', 'string'),
array('secpay', 'string'),
array('trans_id', 'string'),
array('123.132.321.132', 'string'),
array('Mr Jo Bloggs', 'string'),
array('4444333322221111', 'string'),
array('10.51', 'string'),
array('12/10', 'string'),
array('', 'string'),
array('', 'string'),
array('', 'string'),
array('', 'string'),
array('', 'string'),
array('test=true,dups=false', 'string')
);
$this->xmlrpc->request($request);
if ($this->xmlrpc->send_request()) {
echo '<pre>';
print_r($this->xmlrpc->display_response());
echo '</pre>';
} else {
echo $this->xmlrpc->display_error();
}
}
}
But the output is always: 'No data received from server.'
Am I doing something wrong?