Change in checkout flow - error in SubmitBasket.xslt
Hi all,
I am experiencing an error
in SubmitBasket.xslt when I go from the payment provider (DIBS) to the order
confirmation.
I have changed the flow of
the checkout in xslt so I can see a specified view of the order before going to
the payment provider.
To do this I have created
an extra step in the checkout.
In the submit I have
removed UpdatePayment:
<umbraco:Macro Alias="OrderDetails[XSLT]"
runat="server"></umbraco:Macro>
<!-- UpdatePayment - MOVED TO PAYMENT GATEWAY -->
I have then made an extra
step (Payment Gateway) that contains Payment Gateway:
<umbraco:Macro Alias="UpdatePayment[XSLT]"
runat="server"></umbraco:Macro>
And then I go to Order
Confirmation that holds submitBasket
<umbraco:Macro Alias="SubmitBasket[XSLT]"
runat="server"></umbraco:Macro>
As such it looks fine (flow
wise) - but it returns an error in SubmitBasket[XSLT] - more specifically in
<xsl:variable name="result"
select="CommerceLibrary:Checkout()"></xsl:variable>
I cannot see what goes
wrong. The order is registered in uCommerce, the basket is emptied and I
receive a confirmation mail. In the checkout pipeline I have added the
decrementInventory (and removed it again fearing it was the troublemaker).
I do not know if it is of any relevance – the order number increments by 2 with each order (it has been set
to 1).
If it can be of any help –
my checkout.config looks like this.
Is there something that I
have misunderstood completely?
userId NodeId Datestamp logHeader 0 -1 2013-03-14 14:36:00.250 System Thread was being aborted. Void AbortInternal() at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.AbortCurrentThread() at System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) at UCommerce.Transactions.Payments.ExternalPaymentMethodService.RequestPayment(PaymentRequest paymentRequest) at UCommerce.Transactions.TransactionLibraryInternal.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at UCommerce.Xslt.LibraryImpl.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at UCommerce.Xslt.Library.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) at umbraco.presentation.templateControls.Macro.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at umbraco.presentation.templateControls.Macro.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(...
0 -1 2013-03-14 14:36:19.677 Error Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.
0 -1 2013-03-14 14:36:19.680 System Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details. UCommerce.Pipelines.PipelineExecutionResult Execute(T) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Transactions.CheckoutService.Checkout(Basket basket) at UCommerce.Transactions.TransactionLibraryInternal.Checkout() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout_callback() at Castle.Proxies.Invocations.TransactionLibraryInternal_Checkout.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) No billing address is set for order b411daf1-b2d2-4b5f-affd-f8aad923eabe. Please add an OrderAddress and set that as the billing address of the order. UCommerce.Pipelines.PipelineExecutionResult Execute(UCommerce.EntitiesV2.PurchaseOrder) at UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout() at UCommerce.Xslt.LibraryImpl.Checkout() at UCommerce.Xslt.Library.Checkout() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) at umbraco.presentation.templateControls.Macro.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at umbraco.presentation.templateControls.Macro.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean inc...
0 -1 2013-03-14 14:36:19.680 Error No billing address is set for order b411daf1-b2d2-4b5f-affd-f8aad923eabe. Please add an OrderAddress and set that as the billing address of the order. UCommerce.Pipelines.PipelineExecutionResult Execute(UCommerce.EntitiesV2.PurchaseOrder) at UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder) at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
It is a bit odd because before I go to the payment provider the user confirms the addresses, shipping details and the payment methods. Can You point me in a directions as to where I can find them again?
They must get lost somewhere from orderdetails.xslt - in submit.aspx to paymentgateway.aspx / updatepayment.xslt (with createPayment / executeBasketPipeline) to orderconfirmation.aspx / submitbasket.xslt (the one that fails).
The XSLT needed a bit of tweaking to make it work.
Latest versions of uCommerce 3 makes the different payment methods (local and remote) work more seamlessly.
Ended up upgrading to uCommerce 3.0.8 and making changes to OrderDetails.xslt to use the CommerceLibrary:RequestPayments() API followed by a redirect to order confirmation. This enable Account and remote payment methods like DIBS work in the same way.
Change in checkout flow - error in SubmitBasket.xslt
Hi all,
I am experiencing an error in SubmitBasket.xslt when I go from the payment provider (DIBS) to the order confirmation.
I have changed the flow of the checkout in xslt so I can see a specified view of the order before going to the payment provider.
To do this I have created an extra step in the checkout.
In the submit I have removed UpdatePayment:
<umbraco:Macro Alias="OrderDetails[XSLT]" runat="server"></umbraco:Macro>
<!-- UpdatePayment - MOVED TO PAYMENT GATEWAY -->
I have then made an extra step (Payment Gateway) that contains Payment Gateway:
<umbraco:Macro Alias="UpdatePayment[XSLT]" runat="server"></umbraco:Macro>
And then I go to Order Confirmation that holds submitBasket
<umbraco:Macro Alias="SubmitBasket[XSLT]" runat="server"></umbraco:Macro>
As such it looks fine (flow wise) - but it returns an error in SubmitBasket[XSLT] - more specifically in <xsl:variable name="result" select="CommerceLibrary:Checkout()"></xsl:variable>
I cannot see what goes wrong. The order is registered in uCommerce, the basket is emptied and I receive a confirmation mail. In the checkout pipeline I have added the decrementInventory (and removed it again fearing it was the troublemaker).
I do not know if it is of any relevance – the order number increments by 2 with each order (it has been set to 1).
If it can be of any help – my checkout.config looks like this.
Is there something that I have misunderstood completely?
Kind regards,
Sonni T.
Does the exception showup in the umbracoLog database-table?
If so - could you post it?
It does:
userId NodeId Datestamp logHeader
0 -1 2013-03-14 14:36:00.250 System
Thread was being aborted. Void AbortInternal() at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.AbortCurrentThread() at System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) at UCommerce.Transactions.Payments.ExternalPaymentMethodService.RequestPayment(PaymentRequest paymentRequest) at UCommerce.Transactions.TransactionLibraryInternal.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at UCommerce.Xslt.LibraryImpl.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at UCommerce.Xslt.Library.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) at umbraco.presentation.templateControls.Macro.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at umbraco.presentation.templateControls.Macro.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(...
0 -1 2013-03-14 14:36:19.677 Error
Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.
0 -1 2013-03-14 14:36:19.680 System
Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details. UCommerce.Pipelines.PipelineExecutionResult Execute(T) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Transactions.CheckoutService.Checkout(Basket basket) at UCommerce.Transactions.TransactionLibraryInternal.Checkout() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout_callback() at Castle.Proxies.Invocations.TransactionLibraryInternal_Checkout.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) No billing address is set for order b411daf1-b2d2-4b5f-affd-f8aad923eabe. Please add an OrderAddress and set that as the billing address of the order. UCommerce.Pipelines.PipelineExecutionResult Execute(UCommerce.EntitiesV2.PurchaseOrder) at UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout() at UCommerce.Xslt.LibraryImpl.Checkout() at UCommerce.Xslt.Library.Checkout() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) at umbraco.presentation.templateControls.Macro.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at umbraco.presentation.templateControls.Macro.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean inc...
0 -1 2013-03-14 14:36:19.680 Error
No billing address is set for order b411daf1-b2d2-4b5f-affd-f8aad923eabe. Please add an OrderAddress and set that as the billing address of the order. UCommerce.Pipelines.PipelineExecutionResult Execute(UCommerce.EntitiesV2.PurchaseOrder) at UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder) at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
There's your problem :)
No billing address is set for order b411daf1-b2d2-4b5f-affd-f8aad923eabe. Please add an OrderAddress and set that as the billing address of the order.
It is a bit odd because before I go to the payment provider the user confirms the addresses, shipping details and the payment methods. Can You point me in a directions as to where I can find them again?
They must get lost somewhere from orderdetails.xslt - in submit.aspx to paymentgateway.aspx / updatepayment.xslt (with createPayment / executeBasketPipeline) to orderconfirmation.aspx / submitbasket.xslt (the one that fails).
ST
The XSLT needed a bit of tweaking to make it work.
Latest versions of uCommerce 3 makes the different payment methods (local and remote) work more seamlessly.
Ended up upgrading to uCommerce 3.0.8 and making changes to OrderDetails.xslt to use the CommerceLibrary:RequestPayments() API followed by a redirect to order confirmation. This enable Account and remote payment methods like DIBS work in the same way.
is working on a reply...