Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8470273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:28:17+00:00 2026-06-10T16:28:17+00:00

We are using virtual merchant payment gateway in our application: https://www.myvirtualmerchant.com/VirtualMerchant/download/developerGuide.pdf I am trying

  • 0

We are using virtual merchant payment gateway in our application:

https://www.myvirtualmerchant.com/VirtualMerchant/download/developerGuide.pdf

I am trying to record a CCSALE transaction but I keep getting this error:

<?xml version="1.0" encoding="UTF-8"?>
<txn><errorCode>6042</errorCode><errorName>Invalid Request Format</errorName><errorMessage>XML request is not well-formed or request is incomplete.</errorMessage></txn>

The XML I am passing in request in Fiddler POST is:

<txn>
<ssl_merchant_id>my_mer_id</ssl_merchant_id>
<ssl_user_id>my_usr_id</ssl_user_id>
<ssl_pin>my_pin</ssl_pin>
<ssl_test_mode>false</ssl_test_mode>
<ssl_transaction_type>ccsale</ssl_transaction_type>
<ssl_card_number>4111111111111111</ssl_card_number>
<ssl_exp_date>1215</ssl_exp_date>
<ssl_amount>1.00</ssl_amount>
</txn>

I have simply removed my merchant id, user id and ssl pin. The rest of the information is just as it is. I am posting the data to: https://demo.myvirtualmerchant.com/VirtualMerchantDemo/processxml.do

Can anybody let me know why does it say XML is not well formed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:28:18+00:00Added an answer on June 10, 2026 at 4:28 pm

    First of all, after hours of frustration I find PHP way of doing this very retarded. Since this XML error was so persistent, I wanted to try this in Coldfusion and in 2-3 minutes, the whole thing was done, no XML errors, no SSL crap returned from the API. Anyway, enough with the venting! This is probably what you need to prevent that XML well formedness super duper message :

    curl_setopt($ch, CURLOPT_POSTFIELDS, array("xmldata=" . $fields_string));
    

    Assuming you are following their documentation and you are holding the variables in fields_string all you need to do is type something that mimics a variable for the API. In this case, xmldata will do.

    I have yet to listen to the answer which throws this : Curl error: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

    This is thanks to listening to the errors, otherwise $result returned empty after I got rid of XML error. So, here it goes :

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, array("xmldata=" . $fields_string));
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    $result = curl_exec($ch);
    
    if(curl_errno($ch))
        echo 'Curl error: ' . curl_error($ch);
    else
        echo 'the return is ' . $result;
    

    SSL is not setup yet so why the heck they bothered with CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST? It’s not working even when it’s false, this whole thing turned out Charlie Foxtrot!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a graphics application that is using virtual classes fairly extensively. It
From http://www.learncpp.com/cpp-tutorial/125-the-virtual-table/ , code such as class Base { public: virtual void function1() {};
I am considering using virtual inheritance in a real-time application. Does using virtual inheritance
I am running windows 7 and have installed an Ubuntu machine using virtual box.
I have this code to show a map using the Virtual Earth API: <script
I'm currently trying to reverse geocode a series of lat/long co-ordinates using the Virtual
how to set ASP.NET version for virtual directory using c#.net FROM CODE for all
If I'm using a ListView in virtual mode then, as I understand it, the
using C++, I have struct Base { virtual void stuff(/*base stuff*/); }; struct Derived
Problem: I am using Windows as a guest operating system in a Virtual Machine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.