CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Payment Processor issues
Pages: [1]

Author Topic: Payment Processor issues  (Read 2094 times)

martinb1

  • Guest
Payment Processor issues
August 16, 2009, 12:28:09 am
Hi there

I'm trying to test the eWAY payment gateway for a conference I'm almost complete in setting up. Using the test drive option I have entered the eWAY payment details (really only the ID) and their suggested credit card number I get the following error -

Payment Processor Error message
: 9008:Error: XML not formated correctly to eWAY standards. Reason:A semi colon character was expected. Error Code:-1072896755(Test CVN Gateway)

Any ideas how I resolve this one ?

Thanks

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Payment Processor issues
August 16, 2009, 12:39:10 am
Try adding this to line 219 of the eWay processor code:

            return self::errorExit( 9999, $requestxml);   

(civicrm/CRM/Core/Payment/eWay.php)

It should output the xml that you are passing to eWay & hopefully shed some light on why eWay doesn't like it.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

martinb1

  • Guest
Re: Payment Processor issues
August 16, 2009, 03:59:05 am
Hi Eileen

Thanks for your post. Just FYI the path now seems to be - /administrator/components/com_civicrm/civicrm/packages/eWAY and there are two files -

eWAY_GatewayRequest.php & eWAY_GatewayResponse.php

Neither file has code that goes as far as line 219, so I'm at a loss to know which file to add to, and where ?

Many thanks.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Payment Processor issues
August 16, 2009, 05:03:33 pm
No, those are supporting files. There should also be one in /administrator/components/com_civicrm/civicrm/CRM/Core/Payment
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

martinb1

  • Guest
Re: Payment Processor issues
August 16, 2009, 06:13:56 pm
Thanks Eileen

I also turned debugging and backtrace on just in case that could provide any further information -

/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 258
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php, fatal, 207
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php, key, 145
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Event/Controller/Registration.php, __construct, 44
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(201) : eval()'d code, __construct, 1
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, eval, 201
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/admin.civicrm.php, invoke, 45
/home/dynamics/public_html/newsite/administrator/components/com_civicrm/admin.civicrm.php, civicrm_invoke, 22
/home/dynamics/public_html/newsite/libraries/joomla/application/component/helper.php, require_once, 162
/home/dynamics/public_html/newsite/administrator/includes/application.php, renderComponent, 136
/home/dynamics/public_html/newsite/administrator/index.php, dispatch, 67

Sorry. A non-recoverable error has occurred.

Could not find valid Key

and here's the Payment Processor Error message
: 9999:87654321120000Martin Surname44443333222211110111523d5df1dc494ac5Online Event Registration: M&A HR Round TableMartinSurnamemartin@email.addressStreet Addr , Town, VIC.3442523d5df1dc494ac5926d277af8b66831123

As I'm running this is test mode I don't seem to get any output from that $requestxml code ?

I've contacted eWAY support and they are asking me to send them the XML sent ? Should the above $requestxml provide that ?

Cheers
« Last Edit: August 16, 2009, 06:47:02 pm by martinb1 »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Payment Processor issues
August 18, 2009, 03:03:50 am
Hi,

The problem is the eWay code doesn't cope with '&'s

In the Elavon code I added this little function to cope with characters which are not valid in the context of xml values - I'll draw Peter's attention to this to see what he thinks



Code: [Select]
    function tidyStringforXML($value,$fieldlength)
    {
        // the xml is posted to a url so must not contain spaces etc. It also needs to be cut off at a certain
        // length to match the processor's field length. The cut needs to be made after spaces etc are
        // transformed but must not include a partial transformed character e.g. %20 must be in or out not half-way
        $xmlString   = substr(rawurlencode($value),0,$fieldlength);
        $lastPercent = strrpos($xmlString,'%');
        if ($lastPercent >  $fieldlength- 3) {
            $xmlString = substr($xmlString,0,$lastPercent);
        }
        return $xmlString;
    }
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Payment Processor issues

This forum was archived on 2017-11-26.