Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / LinkPoint Invalid XML - how to grab copy of the XML request?

LinkPoint Invalid XML - how to grab copy of the XML request?

Locked

Views: 1,624

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
7 Jan 2014, 8:51 PM
#1
smallarmsdealer avatar

smallarmsdealer

New Zenner

Join Date:
Oct 2007
Posts:
16
Plugin Contributions:
0

LinkPoint Invalid XML - how to grab copy of the XML request?

Hello,

We recently upgraded our server to OS X Mavericks and I am getting cards declined. The logs from the Linkpoint module say Invalid XML.

Server details... PHP 5.4.23, Apache 2.2.26, ZenCart 1.3.9h

What I want to do is have either linkpoint_api.php or class.linkpoint_api.php dump me a copy of the XML in the request its posting to the payment processor as that's what they're requesting in debugging this with me over the phone.

Has anyone ever done this? I just want to capture the full XML post params it sends via curl and log it to a file.

Specific response code:

Response Code: SGS-020003: Invalid XML

I have verified via phpinfo that I have all the same modules like curl, soap, etc and in the apache general error logs I don't see anything interesting.

7 Jan 2014, 9:33 PM
#2
smallarmsdealer avatar

smallarmsdealer

New Zenner

Join Date:
Oct 2007
Posts:
16
Plugin Contributions:
0

Re: LinkPoint Invalid XML - how to grab copy of the XML request?

I'm trying to add a function like this but it's not working

 function mike_log($data)·
 {
//MIKE DEBUG
// Logging class initialization
$log = new Logging();
// set path and name of log file (optional)
$log->lfile('/tmp/mikelog.txt');
// write message to the log file
$log->lwrite($data);
// close log file
$log->lclose();
 }
8 Jan 2014, 4:26 PM
#3
smallarmsdealer avatar

smallarmsdealer

New Zenner

Join Date:
Oct 2007
Posts:
16
Plugin Contributions:
0

Re: LinkPoint Invalid XML - how to grab copy of the XML request?

I was able to get the XML. I sanitized it with some fake values and a fake CC - would someone please have a look I can't see anything wrong with it for it to be invalid?

<order>
  <orderoptions>
    <ordertype>SALE</ordertype>
    <result>LIVE</result>
  </orderoptions>
  <creditcard>
    <cardnumber>4024007147626203</cardnumber>
    <cardexpmonth>07</cardexpmonth>
    <cardexpyear>15</cardexpyear>
    <cvmvalue>555</cvmvalue>
    <cvmindicator>provided</cvmindicator>
  </creditcard>
  <billing>
    <name>Mike Test</name>
    <company></company>
    <address1>4200 Nw Tester Pl</address1>
    <address2>Apt 2</address2>
    <city>Corvallis</city>
    <state>Oregon</state>
    <zip>97330</zip>
    <country>US</country>
    <userid>474</userid>
    <email>miketestingtestfakemail######################</email>
    <phone>8003413208</phone>
    <addrnum>4200 Nw Tester Pl</addrnum>
  </billing>
  <shipping>
    <name>Mike Test</name>
    <address1>4200 Nw Tester Pl</address1>
    <address2>Apt 2</address2>
    <city>Corvallis</city>
    <state>Oregon</state>
    <zip>97330</zip>
    <country>US</country>
  </shipping>
  <transactiondetails>
    <oid>58156-d5nfSZ</oid>
    <ponumber></ponumber>
    <terminaltype>UNSPECIFIED</terminaltype>
    <ip>174.37.30.20</ip>
    <transactionorigin>ECI</transactionorigin>
  </transactiondetails>
  <merchantinfo>
    <configfile>5551234</configfile>
    <keyfile>
    /Library/WebServer/Documents/fakewebsitestore.com/includes/modules/payment/linkpoint_api/5551234.pem</keyfile>
    <host>secure.linkpt.net</host>
    <port>1129</port>
  </merchantinfo>
  <payment>
    <chargetotal>10.28</chargetotal>
    <shipping>4.29</shipping>
    <subtotal>5.99</subtotal>
  </payment>
  <notes>
    <comments>Website Order</comments>
  </notes>
  <items>
    <item>
      <id>425</id>
      <description>Original Test Product</description>
      <quantity>1</quantity>
      <price>5.99</price>
    </item>
  </items>
</order>
```'

Thanks
8 Jan 2014, 6:57 PM
#4
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: LinkPoint Invalid XML - how to grab copy of the XML request?

smallarmsdealer and myself have been working this issue together.

We captured the XML andsent a copy to Linkpoint support.
First question they asked was is our server 64 bit or 32bit.
Linkpoint API won't work with a 64bit system. Something about the linkpont library files don't work in 64 bit.
The XML looked perfectly formatted. What we didn't realize was some of the required data is missing. For instance in the <payment> section the <tax> tags and data were missing. This is required, even if the amount is zero.
We are currently converting our macmini server to 32 bit Mavericks