CodeIgniter Forums
Help!! XML-RPC Issues. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Help!! XML-RPC Issues. (/showthread.php?tid=43532)



Help!! XML-RPC Issues. - El Forum - 07-14-2011

[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/soap-xmlrpc/xmlrpc-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?


Help!! XML-RPC Issues. - El Forum - 07-20-2011

[eluser]WebMada[/eluser]
Good question! I don't have the response but I wonder if the xmlrpc library supports https (SSL) communication?


Help!! XML-RPC Issues. - El Forum - 07-20-2011

[eluser]skunkbad[/eluser]
XML-RPC doesn't work with SSL. You'll have to create your own library and use cURL. I tried to extend the XML-RPC class to use cURL and SSL, but I didn't get it working 100%, and just made my own solution because XML-RPC usage wasn't ideal for my situation anyways.

PS. As far as I'm concerned, this is a bug, because of the high likelihood of needing to use SSL for XML-RPC. I wish the CI team would consider this, but I don't have any more votes left.


Help!! XML-RPC Issues. - El Forum - 07-20-2011

[eluser]WebMada[/eluser]
[quote author="skunkbad" date="1311210879"]
PS. As far as I'm concerned, this is a bug, because of the high likelihood of needing to use SSL for XML-RPC. I wish the CI team would consider this, but I don't have any more votes left.[/quote]
I hope so!


Help!! XML-RPC Issues. - El Forum - 07-21-2011

[eluser]Unknown[/eluser]
very much http://ask-cheats.ru/


Help!! XML-RPC Issues. - El Forum - 10-04-2012

[eluser]yabdab[/eluser]
I too am running into this issue with SSL . Has hacked a way around this? Seems the xmlrpc has not been touched since 1.0.0


Help!! XML-RPC Issues. - El Forum - 10-04-2012

[eluser]skunkbad[/eluser]
[quote author="yabdab" date="1349375362"]I too am running into this issue with SSL . Has hacked a way around this? Seems the xmlrpc has not been touched since 1.0.0[/quote]

This was working:
https://github.com/skunkbad/MY_Xmlrpc

I don't know if it needs an update. I don't use it anymore.


Help!! XML-RPC Issues. - El Forum - 10-04-2012

[eluser]yabdab[/eluser]
Thanks, I will give that a try.