public override string ToXml(ISignatureProvider signatureProvider) { XNamespace xmlNamespace = "http://www.idealdesk.com/Message"; var directoryRequestXmlMessage = new XDocument( new XDeclaration("1.0", "UTF-8", null), new XElement(xmlNamespace + "AcquirerStatusReq", new XAttribute("version", "1.1.0"), new XElement(xmlNamespace + "createDateTimeStamp", CreateDateTimeStamp), new XElement(xmlNamespace + "Merchant", new XElement(xmlNamespace + "merchantID", MerchantId.PadLeft(9, '0')), new XElement(xmlNamespace + "subID", MerchantSubId), new XElement(xmlNamespace + "authentication", "SHA1_RSA"), new XElement(xmlNamespace + "token", signatureProvider.GetThumbprintAcceptantCertificate()), new XElement(xmlNamespace + "tokenCode", signatureProvider.GetSignature(MessageDigest)) ), new XElement(xmlNamespace + "Transaction", new XElement(xmlNamespace + "transactionID", TransactionId) ) ) ); return directoryRequestXmlMessage.Declaration + directoryRequestXmlMessage.ToString(SaveOptions.None); }
public override string ToXml(ISignatureProvider signatureProvider) { XNamespace xmlNamespace = "http://www.idealdesk.com/Message"; var directoryRequestXmlMessage = new XDocument( new XDeclaration("1.0", "UTF-8", null), new XElement(xmlNamespace + "AcquirerTrxReq", new XAttribute("version", "1.1.0"), new XElement(xmlNamespace + "createDateTimeStamp", CreateDateTimeStamp), new XElement(xmlNamespace + "Issuer", new XElement(xmlNamespace + "issuerID", IssuerId.ToString().PadLeft(4, '0')) ), new XElement(xmlNamespace + "Merchant", new XElement(xmlNamespace + "merchantID", MerchantId.PadLeft(9, '0')), new XElement(xmlNamespace + "subID", MerchantSubId), new XElement(xmlNamespace + "authentication", "SHA1_RSA"), new XElement(xmlNamespace + "token", signatureProvider.GetThumbprintAcceptantCertificate()), new XElement(xmlNamespace + "tokenCode", signatureProvider.GetSignature(MessageDigest)), new XElement(xmlNamespace + "merchantReturnURL", MerchantReturnUrl) ), new XElement(xmlNamespace + "Transaction", new XElement(xmlNamespace + "purchaseID", PurchaseId), new XElement(xmlNamespace + "amount", Amount), new XElement(xmlNamespace + "currency", "EUR"), new XElement(xmlNamespace + "expirationPeriod", "PT" + Convert.ToInt32(Math.Floor(ExpirationPeriod.Value.TotalSeconds)) + "S"), new XElement(xmlNamespace + "language", "nl"), new XElement(xmlNamespace + "description", Description), new XElement(xmlNamespace + "entranceCode", EntranceCode) ) ) ); return(directoryRequestXmlMessage.Declaration + directoryRequestXmlMessage.ToString(SaveOptions.None)); }
public override string ToXml(ISignatureProvider signatureProvider) { XNamespace xmlNamespace = "http://www.idealdesk.com/Message"; var directoryRequestXmlMessage = new XDocument( new XDeclaration("1.0", "UTF-8", null), new XElement(xmlNamespace + "AcquirerStatusReq", new XAttribute("version", "1.1.0"), new XElement(xmlNamespace + "createDateTimeStamp", CreateDateTimeStamp), new XElement(xmlNamespace + "Merchant", new XElement(xmlNamespace + "merchantID", MerchantId.PadLeft(9, '0')), new XElement(xmlNamespace + "subID", MerchantSubId), new XElement(xmlNamespace + "authentication", "SHA1_RSA"), new XElement(xmlNamespace + "token", signatureProvider.GetThumbprintAcceptantCertificate()), new XElement(xmlNamespace + "tokenCode", signatureProvider.GetSignature(MessageDigest)) ), new XElement(xmlNamespace + "Transaction", new XElement(xmlNamespace + "transactionID", TransactionId) ) ) ); return(directoryRequestXmlMessage.Declaration + directoryRequestXmlMessage.ToString(SaveOptions.None)); }