Developer forum

Forum » Ecommerce - Standard features » ePay - missing receipt

ePay - missing receipt

René Poulsen
Reply

Hi,

I'm creating a shop with ePay payment window. Everything is working just fint - except from the receipt when I get redirected back to my shop after completing my payment.

The orders shows up as they are supposed to in eCommerce > Orders and they show up in ePay admin as well.

I've set up single step checkout - so in Step 1 I fill in info (name, address etc.), accept terms and conditions. Step 2 is the payment in ePay and Step 3 is the receipt.
If I remove the ePay payment window the receipt is shown just fine.

I haven't used ePay before, so maybe I'm just missing some basic settings? Can someone help me in the right direction? :-)


Replies

 
Nicolai Høeg Pedersen
Reply

Hi René

Could you tell what you get in 3rd step instead of the receipt?

In step 2 DW submits to ePay - check out the template that is being rendered and verify that the callback/redirect URL is correct.

 
René Poulsen
Reply

The paragraph where eCom module is attached is just blank.

I guess it's from step 1 you submit to ePay (i have single step checkout). What is is that you want me to check? The redirect from ePay and back to DW? Or the redirect from DW step1 to ePay payment window?

 
René Poulsen
Reply

When I get redirected back to DW page after payment there's a lot of URL parameters: CheckoutHandlerOrderID, ePayState, txnid, orderid, amount, currency, date, time, txnfee, paymenttype, cardno, fraud and hash

 
René Poulsen
Reply

I just set up an email receipt for the user. It is sent, so that's not a problem.

 
Nicolai Høeg Pedersen
Reply

When going from step1 to ePay, you actually go to step 2 (CheckOutStep in DW) - that is usually a template with a form that automatically submits to epay window. So you can only see what is going on the browsers developer tools. That hidden form will contain a callback and a receipt URL (not an email).

The template could look something like this:

 

<script type="text/javascript">
    paymentwindow = new PaymentWindow({
        'merchantnumber': "<!--@ePay.merchantnumber-->",
        'windowid': "<!--@ePay.windowid-->",
        'language': "<!--@ePay.language-->",
        'orderid': "<!--@ePay.orderid-->",
        'amount': "<!--@ePay.amount-->",
        'currency': "<!--@ePay.currency-->",
        'accepturl': "<!--@ePay.accepturl-->",
        'cancelurl': "<!--@ePay.cancelurl-->",
        'callbackurl': "<!--@ePay.callbackurl-->",
        'smsreceipt': "<!--@ePay.smsreceipt-->",
        'mailreceipt': "<!--@ePay.mailreceipt-->",
        'instantcallback': "1",
        'group': "<!--@ePay.group-->",
        'windowstate': "<!--@ePay.windowstate-->",
        'cms': "<!--@ePay.cms-->",
        'ownreceipt': "<!--@ePay.ownreceipt-->",
        'instantcapture': "<!--@ePay.instantcapture-->",
        'hash': "<!--@ePay.hash-->",
    });

    paymentwindow.open();
</script>

 

Try changing the template being used from Post_simple.html to Post.html and see if that makes a change.

Otherwise create a case with the helpdeks.

Thanks, Nicolai

 
René Poulsen
Reply

I've already created a case, but hasn't got any answer yet.

I've just set the post mode to Autopost (dont use template). Shouldn't I be able to do this and still get the receipt?

 
René Poulsen
Reply

Post.html doesn't work at all.

Post_simple.html works - I can pay, but still there is no receipt when I get back. The callback URL is there in the script: /Default.aspx?ID=18&CheckoutHandlerOrderID=ORDER16&ePayState=Callback

 
Nicolai Høeg Pedersen
Reply

Can you post a URL please.

 
René Poulsen
Reply

If I check the developer console it redirects from here:

https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx?accept=1&sessionid=19080937&sessionkey=C6C51F63958592FD88889D0B13737401&txnid=60068730&orderid=ORDER17&amount=18000&currency=208&date=20160112&time=1234&txnfee=0&paymenttype=1&cardno=444444XXXXXX4000&fraud=1&hash=756136e5fb28e2127b933a1942c657a8

 

To:

/Default.aspx?ID=18&CheckoutHandlerOrderID=ORDER17&ePayState=Ok&txnid=60068730&orderid=ORDER17&amount=18000&currency=208&date=20160112&time=1234&txnfee=0&paymenttype=1&cardno=444444XXXXXX4000&fraud=1&hash=9a8816ae5465e795dde9867f326449b4

 

And because we use friendly urls this redirects to:

kurv?CheckoutHandlerOrderID=ORDER17&ePayState=Ok&txnid=60068730&orderid=ORDER17&amount=18000&currency=208&date=20160112&time=1234&txnfee=0&paymenttype=1&cardno=444444XXXXXX4000&fraud=1&hash=9a8816ae5465e795dde9867f326449b4

 
Nicolai Høeg Pedersen
Reply

ok, that looks right. And you are sure you have a template on the receipt that renders something?

 
René Poulsen
Reply

Yes, pretty sure. Just double checked and removed the ePay payment. Then I got the receipt like I should.

A div element in my paragraph template gets rendered - but the ParagraphModule doesn't get rendered at all.

 
René Poulsen
Reply

Always search for < - - @ in your templates when going from HTML to Razor! ALWAYS! ;-)

Had one of them left in my template. And it was the most important one - the ID of the payment method.

https://media.giphy.com/media/43bOrDOasXG6Y/giphy.gif

 
Nicolai Høeg Pedersen
Reply

doh...

 

You must be logged in to post in the forum