Is it possible to add a property to the submittet data for DIBS?
I would like to add a pageId to DIBS. DIBS will then send that pageId back in their response, and I can redirect to the page with that pageId on success.
Can it be add'ed when I call: <xsl:value-of select="CommerceLibrary:CreatePayment($paymentId, -1, true(), true())" /> <xsl:value-of select="CommerceLibrary:ExecuteBasketPipeline()" />
Can I add a property to DIBS submit data
Hi
Is it possible to add a property to the submittet data for DIBS?
I would like to add a pageId to DIBS. DIBS will then send that pageId back in their response, and I can redirect to the page with that pageId on success.
Can it be add'ed when I call:
<xsl:value-of select="CommerceLibrary:CreatePayment($paymentId, -1, true(), true())" />
<xsl:value-of select="CommerceLibrary:ExecuteBasketPipeline()" />
?
Thanks :)
I found a workaround.
I just added a property to the order before creating the payment, like so:
<xsl:value-of select="CommerceLibrary:SetOrderProperty('pageId', $pageID)"/>
Then on the postback from DIBS, I retrieved the order by its orderGuid. Then checkedout the order and the redirect the page with javascript:
<xsl:variable name="theOrder" select="CommerceLibrary:GetPurchaseOrderByGuid($guid,false)" />
<xsl:variable name="thePageId" select="$theOrder/purchaseOrder/orderProperties/orderProperty[@key='pageId']/@value" />
<xsl:value-of select="CommerceLibrary:ExecuteBasketPipeline()" />
<xsl:value-of select="CommerceLibrary:Checkout()" />
<script>
function redir(){
window.location = '<xsl:value-of select="umbraco.library:NiceUrl($thePageId)" />';
}
redir();
</script>
:)
Thanks for following up with your solution here. Much appreciated!
is working on a reply...