Announcement

Collapse
No announcement yet.

Running payment modules from admin

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

    Running payment modules from admin

    Hi folks,

    One of my clients is having a problem with my Authorize.net payment module, which is able to create recurring-billing transactions as well as normal one-time payments. They tried to create a new order from the admin pages, and got an error message that includes:

    Authorization failed: Miva Merchant returned an invalid response.
    Function: Order_Authorize
    Response: (here it shows the text of an error message from the module)

    I should mention that this is an older module, using API version 5.00.

    I looked thru the LSK, and I think I know what's going on. This module can process a mix of recurring and one-time purchases in a single order. It has to look at what items are in the basket, to decide what kind(s) of transaction(s) will be needed. But when an admin user creates a new order, Merchant apparently doesn't create a basket with BasketItems, BasketOptions, etc. like it would for a normal checkout. If my understanding from the LSK is correct, the store creates a g.Basket variable by pulling data from the Orders table using the value of a global variable named g.Order_ID.

    Is that correct? It seems odd that the store would create an order before it's authorized the payment.

    Once I understand the environment in which the module is being run, I can modify it to get the data on the items, charges, etc. that the admin user has placed in whatever the store uses instead of a normal basket. Can I get a little help from the in-house gurus to clarify how this works?

    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: Running payment modules from admin

    In admin the creation of an order is completely separated from the concept of a payment transaction. The user may or may not have set the shipping/billing address and added items to the order. The only item you are guaranteed to get in this situation is a valid order ID.

    Comment


      #3
      Re: Running payment modules from admin

      Are there OrderItems, OrderOptions, etc. to go with that order ID? I understand that the admin user might not have entered all this info. But if it has been entered, I need to know how the module can find it. In particular, there are some product attributes (OrderOptions?) that determine whether each item is a recurring purchase or a one-time, which of course is important for the module's operation.

      Thanks -K.
      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


        #4
        Re: Running payment modules from admin

        If the user has entered those items, then you will be able to load them with the provided order_id.

        Comment

        Working...
        X