Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double WebRequest transaction problems

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
HI

I'm sending the url string (at bottom) to a credit card processor. Using the code below it (the card processor) is processing two complete transactions for the same amount and issues me two seperate emails confirming both transactions and both have a different transactionID number assigned.

If I just cut and paste the string into an open browser it works like magic.

I'm using an XML reader and namespacemanager to parse throught the response data which is all correct. I just cant figure out why I'm getting charged for two or the same transaction. Could it be that Im asking for a request and response?

Thanks

Code:
Dim objRequest As HttpWebRequest = CType(WebRequest.Create(urlstr), HttpWebRequest)

        objRequest.Proxy = Nothing
        objRequest.ServicePoint.ConnectionLimit = 4
        objRequest.Timeout = 15000

        Dim objResponse As HttpWebResponse = CType(objRequest.GetResponse, HttpWebResponse)

My URLStr

Code:
[URL unfurl="true"]https://www.myPROCESSOR.com/processxml.do?xmldata=<txn><ssl_merchant_ID>MYACCOUNT</ssl_merchant_ID><ssl_user_id>MYUID</ssl_user_id><ssl_pin>MYPIN</ssl_pin><ssl_transaction_type>ccsale</ssl_transaction_type><ssl_card_number>376741181141008</ssl_card_number><ssl_exp_date>0313</ssl_exp_date><ssl_salestax>0.00</ssl_salestax><ssl_cvv2cvc2_indicator>1</ssl_cvv2cvc2_indicator><ssl_cvv2cvc2>6805</ssl_cvv2cvc2><ssl_invoice_number>2010052500004</ssl_invoice_number><ssl_customer_code>556</ssl_customer_code><ssl_first_name>larry</ssl_first_name><ssl_last_name>may</ssl_last_name><ssl_avs_address>3517[/URL] neal dr</ssl_avs_address><ssl_address2></ssl_address2><ssl_city>knoxville</ssl_city><ssl_state>TN</ssl_state><ssl_avs_zip>37918</ssl_avs_zip><ssl_phone>8659227491</ssl_phone><ssl_email>dashley@shipfms.com</ssl_email><ssl_test_mode>FALSE</ssl_test_mode><ssl_amount>1.44</ssl_amount></txn>
 
I found the problem

I used the URLSTR in the creation of the xmltextreader.
It was sending off what looks like another request.
When I breakpoint the code on that line I'm only getting one transaction processed. When I step into and past the
"New XmlTextReader(urlstr) " code it's causing another transaction. Back to the drawing board HA.



Dim xmldoc As New XmlDocument

Try
Dim xmlreader As XmlTextReader = New XmlTextReader(urlstr)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top