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?
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.
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.
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?
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.
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)?
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.
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.
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.
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?
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ø
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.
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?
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.
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)?
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="**********************************************" />
Do the keys contain any special chars?
For < write <
For & write &
For ' write '
For " write "
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.
Does the payment retain the status of Pending? Or does it change after the callback should have occurred? Maybe to declined?
What does your Checkout pipeline config look like?
Does your checkout pipeline contain the ClearBasketInformation task?
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.
I have just replicated the implementation on another machine and it's the same behavior. Nothing happens when dibs calls back the OrderCompleted page.
Shoot me a mail at [email protected] so we can take a closer look at it.
Is the payment status changed at all?
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.
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.
is working on a reply...