Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Peter Nielsen 144 posts 181 karma points
    Oct 13, 2011 @ 09:04
    Peter Nielsen
    0

    Outputting invoice when return to checkout from DIBS page

    Hi,

    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?! :-)


    /Peter

  • Søren Spelling Lund2689 karma points
    Oct 13, 2011 @ 09:07
    Søren Spelling Lund
    0

    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.

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 09:11
    Peter Nielsen
    0

    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? :-)

    /Peter

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 09:22
    Peter Nielsen
    0

    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? :-)

    /Peter

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 10:08
    Peter Nielsen
    0

    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? :-)

    /Peter

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 10:37
    Peter Nielsen
    0

    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?! :-)

    /Peter

  • Søren Spelling Lund2689 karma points
    Oct 13, 2011 @ 12:38
    Søren Spelling Lund
    0

    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.

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 12:42
    Peter Nielsen
    0

    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? :-)

    /Peter

  • Søren Spelling Lund2689 karma points
    Oct 13, 2011 @ 13:05
    Søren Spelling Lund
    0

    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')"/>
  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 13:09
    Peter Nielsen
    0

    Hehe... Nice :)

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

    /Peter

  • Søren Spelling Lund2689 karma points
    Oct 13, 2011 @ 13:11
    Søren Spelling Lund
    0

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

  • Peter Nielsen181 karma points
    Oct 13, 2011 @ 13:32
    Peter Nielsen
    0

    Looks like it works :D

    Thank you Søren

  • Søren Spelling Lund2689 karma points
    Oct 13, 2011 @ 15:45
    Søren Spelling Lund
    0

    Glad to hear it :)

Please Sign in or register to post replies

Write your reply to:

Draft
Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco version 7.3.0-RC