사이트를 만들고 있는데, 지불 게이트웨이가 있습니다. 필요한 것은 웹 서비스에 일부 C# 요소를 전달하는 것입니다. XML 파일을 출력해야합니다. 내 요소들. 어떻게해야합니까?C# 요소를 사용하여 XML을 출력하는 방법
<PaymentRequest>
<ProductName>Match Ticket</ProductName> (Static value)
<Prefix>Mr</Prefix> (Prefix of the booker)
<FirstName>Test</FirstName> (First name of the user)
<LastName>Test</LastName> (Last name of the user)
<Address>Test Address</Address> Address of the user(can be a dummy value in case the customer did not fill this)
<City>London</City> City of user(can be a dummy value in case the customer did not fill this)
<Country>UK</Country> Country of user(can be a dummy value in case the customer did not fill this)
<Mobile>98231283123</Mobile> (user phone no)
<EmailId>[email protected]</EmailId> (user email)
<PaymentMethod>PayatBank</PaymentMethod> (this will be the option selected)
<TotalAmount>13314</TotalAmount> (total amount, this is already a label)
<Amount>12926</Amount> (Base amount of the booking)
<GatewayCharge>388</GatewayCharge> (Credit card charges)
<GatewayChargeInPercent>3</GatewayChargeInPercent>
<CallBackURL>http://www.google.com</CallBackURL> Link where the user will get redirected after the payment has been made. This will be used for online payments only.
</PaymentRequest>
'PaymentRequest' 클래스를 만들고 ['XmlSerializer']로 직렬화 할 수 있습니다. (http://msdn.microsoft.com/en-us/library/system.xml.serialization.xml serializer (v = vs.110)) .aspx) –
대답 주셔서 감사합니다, xmlserializer 연구해야합니다 – Kenneth