x First time here? Check out the FAQ
  • Avatar141posts168karma

    Outputting invoice when return to checkout from DIBS page

    Peter Nielsen started this topic October 13, 2011 @ 09:04, Go directly to the topic solution


    When I come back from the DIBS site to the checkout page the SubmitBasket[XSLT].xslt is executed, and sends an email to the customer mail and empties the basket. Perfect.

    But is there a way to make this page print the invoice (on the page that is).

    Like I do with the RequestForm('orderNumber') in the mail. Is there any id-like variables I can use on this page to get the right order from uCommerce like i use CommerceLibrary:GetPurchaseOrder in the email? :-) 

    Well there must be when the email can do it... but how?! :-)


  • Avatar1755posts2618karma
    Comment with ID: 92241
    Søren Spelling Lund posted this reply October 13, 2011 @ 09:07

    The trick is that the customer is returned to the server by DIBS, which controls the URL and thus the parameters passed back. I believe DIBS passed back the orderid passed in, so you can use that to retrieve the order.

  • Avatar141posts168karma
    Comment with ID: 92244
    Peter Nielsen posted this reply October 13, 2011 @ 09:11

    Well.. It seems like im only getting the Reference ID. And the Transaction ID. I could use thoose two, but how to get the order with theese two parameters? :-)


  • Avatar141posts168karma
    Comment with ID: 92247
    Peter Nielsen posted this reply October 13, 2011 @ 09:22

    This is what I get from the DIBS page.

    <input type="hidden" name="merchant" value="90056997" id="acceptform_merchant"/>
    <input type="hidden" name="callbackurl" value="http://www.myshop.dk/6/37/PaymentProcessor.axd" id="acceptform_callbackurl"/>
    <input type="hidden" name="decorator" value="default" id="acceptform_decorator"/>
    <input type="hidden" name="md5key" value="4a0b3c1a90c13f91f3606ccf680aab19" id="acceptform_md5key"/>
    <input type="hidden" name="lang" value="da" id="acceptform_lang"/>
    <input type="hidden" name="currency" value="DKK" id="acceptform_currency"/>
    <input type="hidden" name="amount" value="67500" id="acceptform_amount"/>
    <input type="hidden" name="submitBasket" value="yes" id="acceptform_submitBasket"/>
    <input type="hidden" name="flexwin_cardlogosize" value="1" id="acceptform_flexwin_cardlogosize"/>
    <input type="hidden" name="orderid" value="GR25005" id="acceptform_orderid"/>
    <input type="hidden" name="uniqueoid" value="yes" id="acceptform_uniqueoid"/>
    <input type="hidden" name="accepturl" value="http://www.myshop.dk/shop/checkout/orderconfirmation.aspx" id="acceptform_accepturl"/>
    <input type="hidden" name="cancelurl" value="http://www.myshop.dk/shop/checkout/Cancel.aspx" id="acceptform_cancelurl"/>
    <input type="hidden" name="transact" value="493338191" id="orderconfirmation_transact"/>
    <input type="hidden" name="authkey" value="cae46020208d9d50b4d88cd0810d468d" id="orderconfirmation_authkey"/>
    <input type="hidden" name="approvalcode" value="123456" id="orderconfirmation_approvalcode"/>

    The orderid turn into the reference id in the ucommerce backend order. And then i have the transact... thoose two combined could give me the right order to output from. But what xslt function am I looking at here? :-)


  • Avatar141posts168karma
    Comment with ID: 92251
    Peter Nielsen posted this reply October 13, 2011 @ 10:08

    Is there a way I can send the Order ID to the DIBS page and back to the checkout page again?

    As it is now DIBS thinks that GR25005 is my orderid, but that becomes the ref id at the checkout, and I cant get af purchaseorder by ref id?!

    You can see here that the order id (in the left) is WEB-16, and Ref ID is the one from DIBS?!

    Any suggestions? :-)


  • Avatar141posts168karma
    Comment with ID: 92253
    Peter Nielsen posted this reply October 13, 2011 @ 10:37

    It seems like a have a "Defaul" and a "Default Payment Reference" in the Order Number settings, in the uCommerce settings sections.

    Should I just have one? Or why does the DIBS settings send the Default Payment Reference (GR25005) to the DIBS page as the Order ID?

    Cant find anywhere to assign these Order Numbers to anything?! :-)


  • Avatar1755posts2618karma
    Comment with ID: 92261
    Søren Spelling Lund posted this reply October 13, 2011 @ 12:38

    The trick is that customer might at any point cancel the payment before completing the order so by default we don't assign an order number until we receive a message from DIBS saying that the payment was completed. In the meantime we use the payment reference in place of the order number.

    If you want an order number assigned before the payment is completed (and this have the order number available in DIBS) you can use the CommerceLibrary:AssignOrderNumber extension.

  • Avatar141posts168karma
    Comment with ID: 92262
    Peter Nielsen posted this reply October 13, 2011 @ 12:42

    Well... I can see the problem.

    But isnt there a way to get the order from a xslt function with the ref end and trans id then? :-)


  • Søren Spelling Lund posted this reply October 13, 2011 @ 01:05

    It just happens that there is :)

    uCommerce 2.1 introduces an XSLT extension for loading purchase order by payment reference. it's still a prerelease so I would appreciate any feedback you can give us.

    <xsl:variable name="purchaseOrder" select="CommerceLibrary:GetPurchaseOrderByPaymentReference('Reference-123')"/>

  • Avatar141posts168karma
    Comment with ID: 92265
    Peter Nielsen posted this reply October 13, 2011 @ 01:09

    Hehe... Nice :)

    Well.. Im just about done with this site, so I have a question. Is it safe to upgrade, and how do I? :-)


  • Avatar1755posts2618karma
    Comment with ID: 92266
    Søren Spelling Lund posted this reply October 13, 2011 @ 01:11

    Install new package on top of the old one. uCommerce will take care of it.


Please login or Sign up To post replies