Developer forum
E-mail notifications
Hooking into existing gateways
Is it possible to hook into the existing gateways to update an order?
The two Dutch gateways have a nasty issue. The OrderComplete flag is only set in step 6, and not also when the gateway calls back and says the order is paid. This means that when users close their browser to early, step 6 is never hit, the order stays red but is paid under the hood. This in turn means shop owners are more than likely to miss this order.
Possible fixes:
1. In DocData and Ogone providers: set complete to true when the gateways confirms the payment
2. Hook into the process manually and fix it myself.
I prefer option 1, but I realize this may take some time to implement and deploy. Can this be added as an enhancement request for these providers?
Any other ideas for option 2?
Thanks in advance,
Imar
Replies
Both Ogone and Docdata have been rewritten as checkouthandlers for cartv2 in 7.2 - maybe they have it.
Imar
Attached 2 projects:
Dynamicweb.eCommerce.CartV2.CheckoutHandler with cartv2 check out handlers including Ogone and Docdata
Dynamicweb.eCommerce.Orders.Gateways with all the gateway providers for cartv1
The Cart V1 project you sent is just the Gateway provider. Both DocData and Ogone rely on separate call back pages located in Admin/Public/Gateways and inherit Dynamicweb.Admin.Gateways.DocData.DocDataStatusPage and Dynamicweb.Admin.Gateways.Ogone.OgoneStatusPage respectively. This means we can't add this source as a separate gateway to an existing project as it relies on /Admin.
What I believe that needs to be added to these two classes is this:
1. DocData:
In FillForm, right below this line:
order.GatewayPaymentStatus = Me.ConvertDocDataStatusToDwStatus(gatewayPaymentStatusResult)
the following code is needed to mark the order as Complete when DocData returned paid or closed_success:
If order.GatewayPaymentStatus = "Paid" Or order.GatewayPaymentStatus = "ClosedSuccess" Then
order.Complete = True
End If
Note: I am not 100% sure about Complete here. What needs to happen is that it changes the order from red to black in the Order list. In addition, it should also update the stock, provided this hasn't been done before in Step 6.
2. Ogone
In FillForm, right below this line:
order.GatewayPaymentStatus = Me.ConvertOgoneStatusToDwStatus(Base.Request("STATUS"))
the following code is needed to mark the order as Complete.
If order.GatewayPaymentStatus = "Paid" Then
order.Complete = True
End If
Same thing here with regard to Order.Complete and the stock update.
I'll be happy to work with someone from your team over e-mail to finalize thoughts about this...
BTW: my e-mail to youris bouncing since I appear to be blacklisted. I am not being impolite by not responding ;-) Will work on the blacklisting....
Imar
Just took it with the guys - we make a change for 7.2 so it will be fixed with your solution.
Also too a look at the gateways for Cartv2 - and they do not have this issue.
Thanks!
Btw: You should be able to mail me again...
I certainly will. I just thought that Ogone and DocData weren't updated for V2. Pleased to see they are.
Thanks,
Imar
We have shops using Ogone or Buckaroo.
The Buckaroo payment gateway used in our sites is developed by DynamicWeb.
Imar
I've been doing some tests on the new Ecom7 Ogone en DocData gateways not yet released.
I'm happy to see the red orders issue in the backend will be solved by this implementation. I've not been able to test extensibility which I think is going to come in handy if a problem may occur or to extend anything. My external dll wasn't pickedup somehow by dynamicweb, maybe I will look at that in a later stage. Not to worry about at this time?
In my tests I've only experienced one problem: when canceling an order in the gateway I've seen a cart being created in the backend with a different amount than the original.
At the sametime an error occurs in the frontend. Might this be due to configuration or something. By the way is there going to be documentation on how to configure the gateways?
The Buckaroo Payment provider was developed as a cooperation between Innovadis and DW NL and should/will be part of the standard installation. Therefor this ons should also be fixed for the issue with red orders.
The source is off course available to DW since it was build in Russia.
Nicolai: can you make sure the Buckaroo provider will be included in the standard software and will also have the same fix applied?
Thanks.
Juriaan
The fixes to Ogone and Docdata for Cartv1 is part of 7.2 and hotfix 19.1.2.4.
Hotfix is out later today.
Just for the record. Buckaroo is currently just CartV1 yet, CartV2 still needs to be developed.
So: Can you apply the fix also on Buckaroo CartV1 and schedule Buckaroo CartV2 implementation?
>> The fixes to Ogone and Docdata for Cartv1 is part of 7.2 and hotfix 19.1.2.4.
Excellent news! Thanks,
Imar
I'll also have the cartv1 version integrated to DW at some point - and then we can make the bugfix for that as well. Currently we do not have the source code.
I've finished testing with the new Ogone and docdata cart v2 gateways. And I've found to problems
Further more I've found that extensibility is fine on both gateways and the red order issue is gone with this release.
*********** Issue 1 ***********
It's not possible to return to the website after payment with Ogone. After payment you get a white blank screen were normally Ogone payment results are displayed and
you get redirected to the website.
PROBLEM
/Admin/Public/Gateways/CheckoutHandler/Ogone/OgoneFormSubmit.aspx
This page and codebehind handles the submission of the form from Dynamicweb to Ogone and sends the wrong accepturl. Ogone specifies that the accepturl can be specified in the backend as well, but will overwritten by the accepturl submitted from the form on the website.
Therefor there is no way to work around this problem. Another problem that may be part of this problem is that the default template provided by dynamicweb has 3 forms caused by someone doing some wrong copy and pasting i guess (see attached). It's pretty messed up and I hope
this will be fixed before release.
BACKGROUND INFORMATION
I've compared the old cartv1 Ogone template with the new cartv2 Ogone (when fixed) they are almost the same only the handler:
/Admin/Public/Gateways/Ogone/OgonePaymentPage.aspx
becomes
/Admin/Public/Gateways/CheckoutHandler/Ogone/OgoneFormSubmit.aspx
some tags are different and new ones are introduced:
old
<INPUT type="hidden" NAME="ACCEPTURL" VALUE="<!--@Ecom:Order.Gateway.Page.OK-->">
<INPUT type="hidden" NAME="declineurl" VALUE="<!--@Ecom:Order.Gateway.Page.Cancel-->">
<INPUT type="hidden" NAME="exceptionurl" VALUE="<!--@Ecom:Order.Gateway.Page.Cancel-->">
<INPUT type="hidden" NAME="cancelurl" VALUE="<!--@Ecom:Order.Gateway.Page.Cancel-->">
new
<INPUT type="hidden" NAME="ACCEPTURL" VALUE="<!--@Ogone.continueurl-->">
<INPUT type="hidden" NAME="declineurl" VALUE="<!--@Ogone.cancelurl-->">
<INPUT type="hidden" NAME="exceptionurl" VALUE="<!--@Ogone.cancelurl-->">
<INPUT type="hidden" NAME="cancelurl" VALUE="<!--@Ogone.cancelurl-->">
<INPUT type="hidden" NAME="OrderID" VALUE="<!--@Ogone.OrderID-->">
<INPUT type="hidden" NAME="OgoneState" VALUE="<!--@Ogone.State-->">
The Ogone configuration changed in:
old:
/Admin/Public/Gateways/Ogone/OgoneStatusPage.aspx
new:
/Admin/Public/Gateways/CheckoutHandler/Ogone/OgoneFormCallBack.aspx
I've tried several accepturl's in the backend for returning. None worked this far:
For example:
http://www.gatewaystests.demo3.dynamicweb.nl/Default.aspx?ID=52
http://www.gatewaystests.demo3.dynamicweb.nl/
Therfore i suspect (it's a blackbox I can't see anything) that OgoneFormSubmit.aspx must havesend the wrong url.
***************** Issue 2 ***********
When cancelling an order in docdata the cart is lost (couldn't test this for Ogone) and a cart with a strange amount appears in the backend of dynamicweb
sometimes an error is also displayed in Dynamicweb that something went wrong. See the video attached.
This is the update from the developer working with this:
About the first issue - the accept and cancel url is correct, something wrong in Ogone backoffice settings. Look on the other Ogone test account.
for the second issue - registered new bug #5749
TFS #5749 When cancelling an order in docdata the cart is lost and a cart with a strange amount appears in the backend - In Progress
If the URL's passed are correctly, can you show us a working version and also supply us with the settings you've applied in Ogone for that? Or supplie us the test account your using so we can check the Ogone settings ourselves.
We've tested this over and over and can't get it to work.
Thanks.
Juriaan
Thanks for the test account. We've tested it and it turned out we had a slight difference in settings. We've adjusted that and now it works fine, so indeed there's no error in DW.
Gr.
Juriaan
Hi there,
Thanx for the previous response on the two issues I've proposed. Apparently there was a gateway configuration mistake with the first issue (change i was not aware off). Glad that this is no longer an issue.
Unfortunately, another client of ours has another problem with the Ogone gateways. He's trying to use the Ogone payment gateway in combination with Paypal. That means letting Ogone handle payments with paypal.
This seemed like a working scenario at the time (since handling payments with paypal directly in DW will be released at a later stage), but we found out that Paypal does not allow the paymentpage to be IFramed and is rejecting all payments done in this way.
Guess what... In the old Cartv1 and new Cartv2 this (or something like it) seemed to be the case since both are handled bij OgonePaymentPage.aspx or OgoneFormSubmit.aspx. I couldn't find any traces of Iframing here but dw is not really redirecting to Ogone directly either. Can a solution be found for this issue?
Lucas
You must be logged in to post in the forum