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!

Posting xml from asp.net doing credit card authorization 1

Status
Not open for further replies.

Sammy145

Programmer
Oct 4, 2002
173
GB
I need to POST xml to a secure https url what i would like more details on is the best way. I have sample xml files from the merchant account all i would like to do is a preauth on the card

here is the code in xml whats the best method in asp.net do i build a xml string and how would i capture the response (valid or not valid)

<?xml version="1.0" encoding="UTF-8"?>
<EngineDocList>
<DocVersion>1.0</DocVersion>
<EngineDoc>
<ContentType>OrderFormDoc</ContentType>
<User>
<Name>XML_store</Name>
<Password>xml</Password>
<ClientId DataType="S32">TESTNUMBER</ClientId>
</User>
<Instructions>
<Pipeline>PaymentNoFraud</Pipeline>
</Instructions>
<OrderFormDoc>
<Mode>Y</Mode>
<Comments/>
<Consumer>
<Email/>
<PaymentMech>
<CreditCard>
<Number>TESTCARDNUMBER</Number>
<Expires DataType="ExpirationDate" Locale="840">01/04</Expires>
</CreditCard>
</PaymentMech>
<BillTo>
<Location>
<TelVoice/>
<TelFax/>
<Address>
<Name>PTS PreAuth Test (Level I)</Name>
<Street1>test</Street1>
<PostalCode>test</PostalCode>
<Country>test</Country>
<Company/>
</Address>
</Location>
</BillTo>
</Consumer>
<Transaction>
<Type>PreAuth</Type>
<CurrentTotals>
<Totals>
<Total DataType="Money" Currency="840">1</Total>
</Totals>
</CurrentTotals>
</Transaction>
</OrderFormDoc>
</EngineDoc>
</EngineDocList>
 
If you create a httpWebRequest and pass the XML string to the page (you can build the XML file by using the System.Xml.XmlDocument class) then you should be able to use httpWebResponse to capture the details of the merchants response. Also, check their website as a lot of sites will provide sample applications for various different languages.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
thanks will take that approach.

The merchant doesnt have sample code for .net,asp,vb6
 
I another question how secure is this method of posting?
should i use rc4 encryption

sam
 
The method of sending data via SSL means that no-one can intercept the packets that you are sending. If the merchant supports you sending encrypted data then you may as well implement it just to increase that security.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top