close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Order Number in Confirmation & AuthorizeNet

Thread began 3/27/2012 2:44 pm by joerg431091 | Last modified 3/28/2012 11:24 am by Jason Byrnes | 647 views | 7 replies |

joerg431091

Order Number in Confirmation & AuthorizeNet

I have 2 challenges with my confirm.php page and hope someone can give me some ideas:

Everything works perfect except 2 things:

1.) The order confirmation e-mail that the customer receives does sometimes have the order number included but most of the time not (it is displayed on the checkout_success page but not in the confirmation e-mail).

I do have the code for the order number in the confirmation e-mail as follows:

<?php echo ((isset($_SESSION["eCart1_OrderID"]))?$_SESSION["eCart1_OrderID"]:"")?>

And as mentioned. It sometimes works but unfortunately not all the time. I thought that this would maybe be a browser compatibility problem but was not able to see a difference among all browsers.

2.) The Order/Invoice number that is transmitted and then displayed in AuthorizeNet is different from the customers order number

I have the following value in the server behavior for authorize net for x_invoice_num which is:

<?php echo session_id(); ?>

It seems to be different from the actual order number.

Any ideas for those 2 challenges would be appreciated.

Best,
Joerg

Sign in to reply to this post

Jason ByrnesWebAssist

use the session ID as the order number in both the email and in the x_invoice_num;


<?php echo session_id(); ?>



this will use the same order number in both places.

Sign in to reply to this post

joerg431091

Hi Jason,

Thanks a lot for your prompt reply.

I did that and it works. However, I need to rather have the order number from the database displayed on the order confirmation as well as in authorizeNet. We can not use the session ID as an order number since it is far to long and creates problems with our order processing.

Is there a way in the authorizeNet behavior in the confirm.php page to have the order number that is created by the database transferred to authorize net rather then the session number?

Could I for example change the value in the x_invoice_num field from <?php echo session_id(); ?> to <?php eCart1_OrderID(); ?> or something like this?

Thanks,

Joerg

Sign in to reply to this post

Jason ByrnesWebAssist

no, the x_invoice_num cannot use the order number session ID.

The reason for this is the order that the page processes.

First the order is sent to Authorize.net, if it is successful, the order is stored in the database, at this point the order number session is created.

the only unique value that is available at the time the orders sent to authorize.net is the session id.

Sign in to reply to this post

joerg431091

OK. Understand.

But my main problem is that the order number that is created by the system and the customer sees on the confirm_success.php page is not visible in the confirmation e-mail the customer gets.

We can live with AuthorizeNet displaying the session ID. I just want to make sure that the order number that is created by the Database is actually displayed on the order confirmation e-mail.

Is the code that we have in the order confirmation e-mail correct in this regards:

<?php echo ((isset($_SESSION["eCart1_OrderID"]))?$_SESSION["eCart1_OrderID"]:"")?>

This is the code generated while originally setting up ecart and we never changed it. Strange is, that it sometimes appears on the email but most of the time it does not.

Thanks for your help,

Joerg

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that should be correct for the order id session. it sounds like the code may be in the wrong order on the confirm page.


make sure that the Universal Email code block is after the store order summary and store order details code blocks, it sounds like the UE code block is before those 2.

Sign in to reply to this post

joerg431091

AWESOME. That was exactly what it was and after moving the UE code everything works perfect.

You guys are the best.

Thanks a lot for your help Jason.

Best,
Joerg

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent, glad to hear that helped.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...