• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help!! XML-RPC Issues.

#1
[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
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?

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

#3
[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.

#4
[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!

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

#6
[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

#7
[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.

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.