Payment variables in pipeline.

I've created a custom payment pipeline that processes credit card transactions. In that pipeline, after the payment has been processed, I am trying to set some of the variables for that payment object to indicate it's success or failure.

paymentItem["validation_code"] = "something";
paymentItem["authorization_code"] = "something";
paymentItem["payment_status"] = "something";

The problem is that when I look at the Payment object AFTER the pipeline has finished with it, all of the fields that I set in the pipeline are now blank. I know that those fields are being set properly because I have done it the same way in other pipelines. However for the payment, they are just blank. If anyone has a suggestion I would appreciate it.

Thanks, Daniel


Answer this question

Payment variables in pipeline.

  • ReneeC

    I finally found out what was going on. If you have "Backward Compatible for CreditCard Processing" turned on in the PaymentMethodRouter, it totally messes up and nulls some of your values in the Payments object. The funny thing is that this is turned on by default in the starter site. After I unchecked that checkbox everything works perfectly.

    Thanks for helping, Daniel

  • km77

    Daniel,

    When you say that these values go into the pipeline, I'm assuming that you've put an XmlTracer component into your pipeline to verify that these values are still present after your custom pipeline component has run, or you've turned pipeline debugging on

    I'm just curious if you're losing these values when your order gets translated from a series of IDictionary objects to a Runtime Order, or if you're losing these values in the middle of the pipeline.



  • iosys

    Yes all of the OrderPipelineMappings and OrderObjectMappings have been set.

    <Property Name="ValidationCode" DictionaryKey="validation_code" />
    <Property Name="AuthorizationCode" DictionaryKey="authorization_code" />
    <Property Name="Status" DictionaryKey="payment_status" />

    etc....

    These are standard Commerce Server 2007 properties that were not created by me. The values go into the pipeline but they never come out.

    Thanks, Daniel

  • Pom Figueroa

    Wow...Thanks for posting your answer!

    I spent half-a-day on this exact same problem. I just wanted to save an authorization code.

    "Backward Compatible for CreditCard Processing" sounds far too innocent.

    Billiam



  • spree

    I am debugging the pipelines using Visual Studio so I can step through the pipeline component and see the values as it runs. From what I can diagnose it looses the values in or right after the "PaymentMethodRouter" component in the checkout pipeline. I created a blank pipeline component that checks the "payment_status" variable. My credit card component sets this varible to "approved", if I place my check pipeline component right after my custom credit card component WITHIN the overall CreditCard pipeline the variable still exists. However if I check the value inside the Checkout pipeline after the PaymentMethodRouter has run, then the value is now blank. So the PaymentMethodRouter is either nulling the value out or just not passing it back to the Checkout pipeline.

    Thanks for your help, Daniel

  • mel_mel

    Daniel,

    Have you updated your pipeline mappings file to include these new properties

    http://msdn2.microsoft.com/en-us/library/ms962751.aspx

    The format of your orders in Commerce Server differs from the format of your orders within a pipeline. Running a pipeline will cause Commerce Server to map your runtime order to a pipeline order using the pipeline mappings file and vice-versa. If you don't have the mapping for these new properties set, these values will be lost when pipeline execution concludes.



  • Payment variables in pipeline.