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.

  • Andrei 64 posts 115 karma points
    Nov 08, 2010 @ 13:52
    Andrei
    0

    Integration with payment (Dibs in my case)

    Hi Søren,

    I've been through the articles regarding integration and I am a bit confused about how to handle the order when the payment is authorized.

    I have done everything from this article: http://www.publicvoid.dk/SetupUCommerceToIncludeDIBSAsAPaymentMethod.aspx and I understand from there (the last part -> Executing a Pipeline on Callback) that the Checkout pipeline should be automatically executed on callback if I make a change to the database. But it seems it doesn't, after the payment provider is calling my page back, I still have items in the basket and order status is not changed. Any ideea what am I missing here?

    Should I manually call the pipelines related to finishing the order? like: Checkout, ToCompletedOrder/ToCancelled. Or they are supposed to get called automatically?

  • Soeren Sprogoe 575 posts 259 karma points
    Nov 08, 2010 @ 15:01
    Soeren Sprogoe
    0

    Hi Andrei,

    what you are missing is, that the customers basket is basically stored in a cookie (or rather, the id is). During a normal checkout that cookie is retrieved, the full basket is located in the database, and the basket is then converted to an order via the checkout pipeline.

    When DIBS, or infact all other gateways, is executing the callback method, it is "a browser" at the payment gateway that is executing the callback page, and not the user. Thus the cookie containing the basket id is not available at callbacks.

    This I think is the reason why you are having problems.

    Unfortunately I don't think I can help you any further. Allthough I did an uCommerce / DIBS implementation earlier this year, they didn't have the payment provider interface back then. So I had to do everything manually, including converting a specified basket to an order via the callback page.

    Best regards,
    Søren Sprogø

  • Andrei 64 posts 115 karma points
    Nov 08, 2010 @ 15:48
    Andrei
    0

    Hi Søren,

    I just checked and the basket cookie is sent back to my server. The "browser" that does the callback is actually the same browser the user is in. It seems to me that the callback is done by DIBS through javascript that does a form postback to the callback AcceptedOrder page. In the postback I can detect the basket cookie and the "transact" parameter specific to DIBS. So everything seems to be in place. 

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 08:56
    Søren Spelling Lund
    0

    Hi Andrei,

    While Søren is correct that the cookie was required in earlier versions of uCommerce, it's no longer the case for later versions, certainly not the ones which include built-in payment providers.

    Basically the checkout pipeline, once executed, will clear this information server side.

    For your payment method have you added the Checkout pipeline in the pipeline field (uCommerce_PaymentMethod)? The pipeline must be specified with the name only, e.g. Checkout and not Checkout.config.

    Do you have any additional information in the umbracoLog table?

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 10:35
    Andrei
    0

    Hi Søren,

    You mean the change to the database like bellow?

    I couldn't find anything related in umbraco logs. Everything works fine until the callback from DIBS (I have an OrderCompleted.aspx page for this). The callback from dibs is not detected by uCommerce as coming from dibs. I thought it does that base on the parameters that DIBS is posting, like "transact".. But it seems there is something more needed and I am missing it.

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 10:39
    Søren Spelling Lund
    0

    Exactly. Your database config looks fine though.

    If you're using our DIBS provider the order completed page is only needed for displaying the confirmation to the customer. The callback is actually received on a handler called PaymentProcessor.axd.

    Have you left the provider config Callback value to (auto)?

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 10:55
    Andrei
    0

    Yes, here is my config for dibs (with keys and merchantid hidden):

    <?xml version="1.0"?>

    <dibsPaymentMethodService 

    testMode="True" 

    debug="False"

    login="apiuser"

    password="apipassword"

    callbackUrl="(auto)"

    acceptUrl="http://bc35/shopping/checkout/ordercompleted.aspx" 

    cancelUrl="http://bc35/shopping/checkout/ordercanceled.aspx" 

    merchant="*********" 

    useMd5="True" 

    key1="**********************************************" 

    key2="**********************************************" />

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 11:06
    Søren Spelling Lund
    0

    Do the keys contain any special chars?

    For < write &lt;

    For & write &amp;

    For ' write &#39;

    For " write &quot;

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 11:57
    Andrei
    0

    Yes,  I have encoded the special chars, and dibs is validating the payment so I guess the keys are passed on correctly. I think DIBS would throw some error if it doesn't receive correct keys.

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 12:42
    Søren Spelling Lund
    0

    Does the payment retain the status of Pending? Or does it change after the callback should have occurred? Maybe to declined?

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 12:45
    Søren Spelling Lund
    0

    What does your Checkout pipeline config look like?

    Does your checkout pipeline contain the ClearBasketInformation task?

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 13:14
    Andrei
    0

    It has all the default tasks:

    <value>${Checkout.AssignOrderNumber}</value>

    <value>${Checkout.CreateCustomer}</value>

    <value>${Checkout.CreateMemberForCustomer}</value>

    <value>${Checkout.ConvertBasketToPurchaseOrder}</value>

    <value>${Checkout.AddAuditTrailForCurrentOrderStatus}</value>

    <value>${Checkout.ClearBasketInformation}</value>

    <value>${Checkout.SavePurchaseOrder}</value>

    But I think the pipeline is not called at all, if I implicitly call the pipeline in the OrderCompleted page, then it will clear the basket.

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 14:12
    Andrei
    0

    I have just replicated the implementation on another machine and it's the same behavior. Nothing happens when dibs calls back the OrderCompleted page.

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 14:30
    Søren Spelling Lund
    0

    Shoot me a mail at Soren.Spelling.Lund@ucommerce.dk so we can take a closer look at it.

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 09, 2010 @ 14:30
    Søren Spelling Lund
    0

    Is the payment status changed at all?

  • Andrei 64 posts 115 karma points
    Nov 09, 2010 @ 15:22
    Andrei
    0

    If I manually call CommerceLibrary:Checkout() in the OrderAccepted page, the backet is cleared and the order remains under "New order". I assume that CommerceLibrary:Checkout() is calling the Checkout pipeline. Still no change in order status.

  • Søren Spelling Lund 1796 posts 2764 karma points
    Nov 11, 2010 @ 09:35
    Søren Spelling Lund
    0

    Andrei,

    As you discovered yourself we were missing a step in our setup documentation for the DIBS payment provider. The documentation has been updated to include the missing setup step.

    Thank you for reporting the issue.

Please Sign in or register to post replies

Write your reply to:

Draft