Decrypting Credit Card in Mapping

Home Page Forums BizTalk 2004 – BizTalk 2010 Decrypting Credit Card in Mapping

Viewing 1 reply thread
  • Author
    Posts
    • #21633

      Lets start with a snippet of my source document that I am mapping from:

      <Payments>
      <CreditCardPayment ExpirationYear=”2031
      Status
      =”228252532 ValidationCode=”750 PaymentType=”CreditCard
      BillingAddressId
      =”bce496d7-a879-4ec3-900e-3c26b67c1284 DerivedClassName=”CreditCardPayment
      AuthorizationCode
      =”090980 CustomerNameOnPayment=”James J. Jamison CardType=”MasterCard OrderGroupId=”a4aeb41f-ffff-4974-9742-27cf138bf63d PaymentId=”e623216d-0e72-4b2a-aa38-6213aa96e2ec CreditCardIdentifier=”
      ExpirationMonth
      =”4 Amount=”22.9500 CreditCardNumber=”
      OrderFormId
      =”340ef0d6-e2a3-4250-9b77-d1b122878403 PaymentMethodId=”dc85eeba-fd25-4ee5-a763-123b5c9204dc>
      <WeaklyTypedProperties>
        <WeaklyTypedProperty Name=”CCNumber Value=”tTwAPMzYnSKYzfqTyXyx2e/lU1bic0zn Type=”String />
        </WeaklyTypedProperties>
        </CreditCardPayment>
        </Payments>
      What I need to do inside my mapping is to extract the Value attribute of the WeaklyTypedProperty named CCNumber and then pass that value into an inline C# Script functoid that will do the decryption and then pass out the credit card number that will be written into my destination map.
      The xpath to select the value I want is //CreditCardPayment/WeaklyTypedProperties/WeaklyTypedProperty[@Name = ‘CCNumber’]/@Value
      I have tried writing this into an inline XSLT like this <xsl:value-of select=//CreditCardPayment/WeaklyTypedProperties/WeaklyTypedProperty[@Name = ‘CCNumber’]/@Value” /> so that I have the value I want to pass into my C# script but it doesn’t seem to allow me to chain script functoids together.
      What is the best way to handle this? I cannot simply do a map of the attribute @Value because there can be any number of weakly typed properties that come in a message and I have to be able to pick out the one that has CCNumber to find the right @Value attribute.
      Thanks for your help
    • #21781

      You need to use the Logical Equals (LEq)  and Value Mapping(Flattening) (VM(f))  functoids

      If logical equals(@NAme) == CCNumber then use the value mapping to pass the value to the scrippting functiod. Do the encription

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.