I’m trying to implement submission of an XML document
from my website for credit card processing using my
merchant’s API.
Here’s the format I’m using for my request. For
some reason I keep getting an error message telling me
“Invalid Request Format. XML request is not well-formed or
request is incomplete.”
I know the XML itself is correct, as I can submit it directly
through the URL string in the browser and it works OK.
Here’s what I’m doing:
<cfsavecontent variable="strXML">
<!--- NOTE: test data below -- not my real data --->
<txn>
<ssl_merchant_ID>123456</ssl_merchant_ID>
<ssl_user_id>123456</ssl_user_id>
<ssl_pin>V6NJ3A</ssl_pin>
<ssl_transaction_type>ccsale</ssl_transaction_type>
<ssl_card_number>1111111111111111</ssl_card_number>
<ssl_exp_date>1210</ssl_exp_date>
<ssl_amount>2.34</ssl_amount>
<ssl_salestax>0.00</ssl_salestax>
<ssl_cvv2cvc2_indicator>1</ssl_cvv2cvc2_indicator>
<ssl_cvv2cvc2>321</ssl_cvv2cvc2>
<ssl_invoice_number>1234</ssl_invoice_number>
<ssl_customer_code>1111</ssl_customer_code>
<ssl_first_name>customer</ssl_first_name>
<ssl_last_name>name</ssl_last_name>
<ssl_avs_address>1234 main st.</ssl_avs_address>
<ssl_address2>apt b</ssl_address2>
<ssl_city>any town</ssl_city>
<ssl_state>ST</ssl_state>
<ssl_avs_zip>55555</ssl_avs_zip>
<ssl_phone>555-555-5555</ssl_phone>
<ssl_email>customer@email.com</ssl_email>
</txn>
</cfsavecontent>
<cfhttp
url="
https://www.myvirtualmerchant.com/VirtualMerchant/processxml.do?xmldata="
method="post">
<cfhttpparam type="XML" value="trim(strXML)">
</cfhttp>
<cfoutput>#cfhttp.FileContent#</cfoutput>
Can someone tell me what I’m doing wrong?
(The developer guide is available here:
https://www.myvirtualmerchant.com/VirtualMerchant/download/developerGuide.pdf)
thanks!