Announcement

Collapse
No announcement yet.

error-mesage problem in version 9

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    error-mesage problem in version 9

    Hi folks,

    I have a credit-card payment module that works fine under v5, but is having a slight problem in v9. When a card is declined, the customer is returned to the OPAY page, but the module's error message is not displayed.

    The module is posting the error message with this code:
    Code:
    	<MvASSIGN NAME="l.xx" VALUE="{ [g.Module_Library_Utilities].Message_Error(l.text) }">
    The OPAY template has this code:
    Code:
                    <mvt:if expr="l.settings:messages:error_message_count">
                    <div class="error-message">
                    <mvt:foreach iterator="error" array="messages:error_messages">
                        &mvt:error;
                    </mvt:foreach>
                    </div>
                    </mvt:if>
    -- and the "messages" item is assigned to the page.

    Are we missing something? Could this be a bug?

    Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    #2
    Re: error-mesage problem in version 9

    Hey Kent,

    Your template code looks fine, and if the "messages" item is assigned to the page, that shouldn't be the issue. Where in the module are you calling the Message_Error function? (side note, you can do <MvEVAL EXPR = "{ [ g.Module_Library_Utilities ].Message_Error( l.test ) }"> instead of MvASSIGN since Message_Error does not have any return data).

    You mentioned it was a payment module, so I created a dummy payment module to test. Using the PaymentModule_Runtime_Authorize function (it would be PaymentModule_Authorize if your module's api version is less than 5.60), I was able to get the error message to show without issue using:

    Code:
    <MvEVAL EXPR = "{ [ g.Module_Library_Utilities ].Message_Error( 'Test error' ) }">
    <MvFUNCTIONRETURN VALUE = 0>
    More details about your module would be helpful in diagnosing (module api_version, miva merchant version, engine version, where you're calling the Message_Error function, etc). Best way to track down the issue is to trace the events to see what order functions are being called in and how responses are being output/handled. You can PM me if that is more helpful.
    Ryan Guisewite
    Lead UI Developer / Miva, Inc.
    www.miva.com

    Comment


      #3
      Re: error-mesage problem in version 9

      I'll follow up by PM. Thanks for the quick reply!
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment

      Working...
      X