Zen Cart Logo
Forums / Addon Payment Modules / 2Checkout Direct Return Update

2Checkout Direct Return Update

Views: 14,039

Results 1 to 20 of 26
27 May 2007, 2:25 AM
#1
farrukh avatar

farrukh

Zen Follower

Join Date:
Dec 2003
Posts:
233
Plugin Contributions:
0

2Checkout Direct Return Update

2Checkout just posted this news on their homepage

One of the most utilized features available to our suppliers is the ability to return a customer, along with information regarding their order, to the page from which their order originated. Although this process can be extremely useful and powerful, it can also be misunderstood by someone who does not have all of the available information.

Before I go on, however, I would like to clarify that credit card information is NOT among the information that is returned to our suppliers. In compliance with our Terms of Service, this information can only be collected by 2Checkout on our secure servers.

This article contains detailed information about the process described above, known as Direct Return, and is moderate to very technical in design. Although I originally wanted to use as little jargon as possible, I did not want to create further confusion by over-simplifying the contents. With that in mind, the target audience of this article is most likely web developers and suppliers who are developing their own custom scripts or configuring a third party solution. Also, throughout this article I use the phrase “return URL” to collectively refer to the approved and pending URLs, configurable within your 2Checkout account.

I should probably mention that configuring Direct Return is not necessarily as complicated as it can sound. It can be as simple as entering a URL into a text box and clicking “Save”. However, for those of you who find that you need more, read on.

Choosing the Return URLs

To start, keep in mind that ALL of the methods outlined in this section are optional. If return URLs are not configured for a particular method, Direct Return will skip it and move to the next. If NO return URLs are specified anywhere, the customer will end their purchasing experience on 2Checkout’s Order Processed page (basically, a sales receipt).

There are three methods that can be used to specify a return URL (where customers will be directed after a sale has been made). The first method that will be processed is the “x_receipt_link_url” parameter. This parameter can be used to specify an approved URL on-the-fly, but is limited to the same domain that is used for your 2Checkout account, otherwise it will fail. If the parameter method fails for this or any other reason, the next successful method will be used to determine the return URL instead. This parameter is special in the sense that the general warnings you may have seen that advise not to mix parameter sets do not apply. More information on using the “x_receipt_link_url” parameter can be found here: http://www.2checkout.com/community/?p=203

After the parameter method of specifying a return URL is the product level method. This URL can be set per-product during creation or by editing an existing product. If multiple products using this method are ordered at the same time, the customer will be taken to our Order Processed page with “Click Here” links next to each item. These links will open a new browser window/tab so that the customer can return to the order processed page and follow the links for each product ordered. This method is most common for non-dynamic sites that offer downloadable products as a way to take the customer directly to the item ordered. It’s important to note that, if multiple products are ordered, parameters will be converted from POST to GET for this method. So, if the return URL used here is a script it should be able to handle both methods without breaking.

The final method is the general return URL specified in the Look & Feel section of your 2Checkout account. This URL will be used for all orders that do not utilize one of the previous mentioned methods, and is typically the choice of suppliers and web developers familiar with scripting. The reason for this is that it allows all of the information for every order to be received at one location, which reduces the time and effort needed to develop individual pages for each product or relying on individual product-level return URLs and “Click Here” links. At the least, it can be used to avoid entering the same URL for each product.

Automatic or Manual

After Direct Return selects best return URL from the methods above, it will then direct the customer to your site in one of two ways, detailed below.

With Direct Return enabled (set to “Yes” in your Look & Feel section) the page to be used for the return URL will have the sale parameters posted to it automatically while fetched by our server and displayed to the customer. This also has the effect of masking the URL used so that the customer appears to still be on the 2Checkout domain. This method can be used with redirects as long as each page outputs content (specifically, more then 255 characters) to the browser. If Direct Return encounters a page that redirects without outputting content– usually a header redirect– or content less then 255 characters, then the process will fail and the customer will be sent to our Order Processed page. This is a common issue as many developers will set their return URLs to a script that processes the returned sale parameters, then silently forward the customer to another page (usually a “thank you for purchasing” page or a page featuring download links in the case that an intangible product has been ordered). The solution to this is to either 1.) handle all post-order processing on the page set as your return URL, including the “thank you” message or 2.) Use a timed redirect, typically done via HTML meta tags or JavaScript, after processing the parameters and displaying a message to the customer (remember: at least 255 characters). It is also important to note that if no redirects are used, meaning the URL will be masked by our servers, then relative links will no longer point to the correct location. This can be corrected by using absolute links on the page used for the return URL or by simply using a “base” tag in the head of the document to provide a reference for the relative paths.

For more detailed information on using the HTML base tag, see the following Knowledge Base article:
http://www.2checkout.com/community/?p=316

When Direct Return is disabled (set to “No” in your Look & Feel section) the customer, after completing an order, will then be taken to our Order Processed page. This page will now feature a button at the top with the text “Click Here to Finalize Your Order”. When this button is clicked the customer, and the collected sale parameters, will be directed to the appropriate return URL. No domain masking will be used for this method. In addition, this method obviously relies heavily on user input as no parameters will be posted to the return URL if the customer does not click this button. For this reason, many suppliers that make use of third party order tracking (such as their own shopping cart) prefer to set Direct Return to “Yes”. If a supplier is using the 2Checkout Plug n Play cart, or records necessary parameters at the beginning of a sale before sending the customer to 2Checkout’s purchase page and does not require that the customer return to their page after a sale has completed, this can be a viable option.
One of the most utilized features available to our suppliers is the ability to return a customer, along with information regarding their order, to the page from which their order originated. Although this process can be extremely useful and powerful, it can also be misunderstood by someone who does not have all of the available information.

Before I go on, however, I would like to clarify that credit card information is NOT among the information that is returned to our suppliers. In compliance with our Terms of Service, this information can only be collected by 2Checkout on our secure servers.

This article contains detailed information about the process described above, known as Direct Return, and is moderate to very technical in design. Although I originally wanted to use as little jargon as possible, I did not want to create further confusion by over-simplifying the contents. With that in mind, the target audience of this article is most likely web developers and suppliers who are developing their own custom scripts or configuring a third party solution. Also, throughout this article I use the phrase “return URL” to collectively refer to the approved and pending URLs, configurable within your 2Checkout account.

I should probably mention that configuring Direct Return is not necessarily as complicated as it can sound. It can be as simple as entering a URL into a text box and clicking “Save”. However, for those of you who find that you need more, read on.

Choosing the Return URLs

To start, keep in mind that ALL of the methods outlined in this section are optional. If return URLs are not configured for a particular method, Direct Return will skip it and move to the next. If NO return URLs are specified anywhere, the customer will end their purchasing experience on 2Checkout’s Order Processed page (basically, a sales receipt).

There are three methods that can be used to specify a return URL (where customers will be directed after a sale has been made). The first method that will be processed is the “x_receipt_link_url” parameter. This parameter can be used to specify an approved URL on-the-fly, but is limited to the same domain that is used for your 2Checkout account, otherwise it will fail. If the parameter method fails for this or any other reason, the next successful method will be used to determine the return URL instead. This parameter is special in the sense that the general warnings you may have seen that advise not to mix parameter sets do not apply. More information on using the “x_receipt_link_url” parameter can be found here: http://www.2checkout.com/community/?p=203

After the parameter method of specifying a return URL is the product level method. This URL can be set per-product during creation or by editing an existing product. If multiple products using this method are ordered at the same time, the customer will be taken to our Order Processed page with “Click Here” links next to each item. These links will open a new browser window/tab so that the customer can return to the order processed page and follow the links for each product ordered. This method is most common for non-dynamic sites that offer downloadable products as a way to take the customer directly to the item ordered. It’s important to note that, if multiple products are ordered, parameters will be converted from POST to GET for this method. So, if the return URL used here is a script it should be able to handle both methods without breaking.

The final method is the general return URL specified in the Look & Feel section of your 2Checkout account. This URL will be used for all orders that do not utilize one of the previous mentioned methods, and is typically the choice of suppliers and web developers familiar with scripting. The reason for this is that it allows all of the information for every order to be received at one location, which reduces the time and effort needed to develop individual pages for each product or relying on individual product-level return URLs and “Click Here” links. At the least, it can be used to avoid entering the same URL for each product.

Automatic or Manual

After Direct Return selects best return URL from the methods above, it will then direct the customer to your site in one of two ways, detailed below.

With Direct Return enabled (set to “Yes” in your Look & Feel section) the page to be used for the return URL will have the sale parameters posted to it automatically while fetched by our server and displayed to the customer. This also has the effect of masking the URL used so that the customer appears to still be on the 2Checkout domain. This method can be used with redirects as long as each page outputs content (specifically, more then 255 characters) to the browser. If Direct Return encounters a page that redirects without outputting content– usually a header redirect– or content less then 255 characters, then the process will fail and the customer will be sent to our Order Processed page. This is a common issue as many developers will set their return URLs to a script that processes the returned sale parameters, then silently forward the customer to another page (usually a “thank you for purchasing” page or a page featuring download links in the case that an intangible product has been ordered). The solution to this is to either 1.) handle all post-order processing on the page set as your return URL, including the “thank you” message or 2.) Use a timed redirect, typically done via HTML meta tags or JavaScript, after processing the parameters and displaying a message to the customer (remember: at least 255 characters). It is also important to note that if no redirects are used, meaning the URL will be masked by our servers, then relative links will no longer point to the correct location. This can be corrected by using absolute links on the page used for the return URL or by simply using a “base” tag in the head of the document to provide a reference for the relative paths.

For more detailed information on using the HTML base tag, see the following Knowledge Base article:
http://www.2checkout.com/community/?p=316

When Direct Return is disabled (set to “No” in your Look & Feel section) the customer, after completing an order, will then be taken to our Order Processed page. This page will now feature a button at the top with the text “Click Here to Finalize Your Order”. When this button is clicked the customer, and the collected sale parameters, will be directed to the appropriate return URL. No domain masking will be used for this method. In addition, this method obviously relies heavily on user input as no parameters will be posted to the return URL if the customer does not click this button. For this reason, many suppliers that make use of third party order tracking (such as their own shopping cart) prefer to set Direct Return to “Yes”. If a supplier is using the 2Checkout Plug n Play cart, or records necessary parameters at the beginning of a sale before sending the customer to 2Checkout’s purchase page and does not require that the customer return to their page after a sale has completed, this can be a viable option.

Conclusion

I could never presume to have answered everyone’s questions with this article, but I feel that it is a good start and will be a valuable resource for developers and suppliers delving into the more advanced possibilities that this feature offers.
I could never presume to have answered everyone’s questions with this article, but I feel that it is a good start and will be a valuable resource for developers and suppliers delving into the more advanced possibilities that this feature offers.

21 Jun 2007, 4:27 PM
#2
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

I have the integration set to true but we're not getting the orders send back to our site.

Any tips, suggestions, donations of enlightenment or wisdom preferred.

JP

4 Jul 2007, 12:27 AM
#3
simetra avatar

simetra

Zen Follower

Join Date:
Mar 2005
Posts:
167
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

If anyone can please help me I would be most grateful.

I had 2checout working fine on my 1.3.7 zen cart. Now that my site is ready to go live I found through testing a demo that it is not passing back to my website. It stays on 2Co on the order processed screen even though I have set my passback to www.simetraonline/process_2checkout.php

Here is the tricky part

I installed a clean version of zen cart in a folder called zen to use for testing. I imported my database into it and using THAT site https://www.simetraonline.com/zen I did a demo order. I changed my 2CO passback to show simetraonline.com/zen/process_2checkout.php and it WORKED perfectly. It redirected to my site.

I have gone as far as deleting all the 2co files on my original zen (on the root) and the process_2checkout file and then re-uploaded them from the working area in the zen directory. It still doesnt auto direct. It is using the same files! I cannot for the life of me figure out what to do and my site was live today and I have press releases going out =( I am so desperate and dread having to totally rebuild the site on the fresh install.

Please any insight you are willing to share is truly appreciated.

Thank you,
M E

20 Oct 2007, 8:56 AM
#4
maxer avatar

maxer

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Hallo simetra,
I cant help u I have similar problem. But maybe u can help me. I need 2checkout payment module for zen cart 1.3.7 so badly. Zen cart is a great solution for me but my client can work only with 2checkout. Now I cant find zen cart 1.3.7 payment module for 2co.
Do u have one? And did u overcome your problems with it?

Also I m very angry with zen cart develop team. We are open source and we must rely only to ourself not on teams of other companies. I understand that zen team didnt get help from 2co but who fu..... cares for them or other companies. Lets do it without them. Zen cart is here to help us right?

2 Nov 2007, 4:52 PM
#5
woodzone avatar

woodzone

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Same here.. did you ever resolve yours?

3 Aug 2008, 4:05 PM
#6
tweakservers avatar

tweakservers

New Zenner

Join Date:
Sep 2007
Posts:
67
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Hi Guys,

All of a sudden, the return URL which I have set in the 2checkout is not returning the user back to the store after the user submitted their payment. It just sits at the 2checkout order confirmation page. Anyone have this before? Due to this, the order is not being recorded in the Zen-Cart but I do receive a copy of email about the order sent from 2Checkout.

13 Nov 2008, 4:30 AM
#8
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

This is reply from 2co :

**Greetings Vu,

Thank you for contacting 2Checkout.com. My apologies for any delay in response regarding this issue, and I will be happy to help.

It appears that there may be some issues with the return script itself. I noticed that the script will redirect depending on the response it receives. Our Direct Return feature will not work with redirecting scripts, so data will not be sent back if our Direct Return feature detects redirection. I suggest you contact ZenCart and discuss with them potential reasons why the return script would not be retrieving the data, and also you will want to speak to them about the redirection in their return script.

I hope that I have addressed all of your inquiries and provided a detailed level of support, and I apologize if anything has caused you inconvenience. However, if this is not the information you were seeking or if you require any further assistance, please feel free to reply to this ticket. Your patience and understanding regarding these matters is greatly appreciated.

Thank You,
Simba
2Checkout Product Support**

Any one know how to fix this? I got this problem too.

31 Jan 2009, 9:33 PM
#9
mariuskem avatar

mariuskem

New Zenner

Join Date:
Jan 2009
Posts:
29
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

I just installed 2checkout module and for some reason once the order is completed the 2checkout does not redirect me or I can't find any link that could return me to the store. Is this because I checked out in the DEMO mode? Maybe only in live mode this work. Then, How can I test it?
Thanks

4 Feb 2009, 7:26 PM
#10
donquixote avatar

donquixote

New Zenner

Join Date:
Jan 2009
Posts:
3
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

mariuskem:

I just installed 2checkout module and for some reason once the order is completed the 2checkout does not redirect me or I can't find any link that could return me to the store. Is this because I checked out in the DEMO mode? Maybe only in live mode this work. Then, How can I test it?
Thanks

It should have worked in demo mode if you it in the site info in your 2checkout control panel. Did you get any error messages? Did the order confirmation emails come through? Did the order get registered in your store?

I had a problem not returning to store, but it was the email setting in store I needed to adjust. But in demo mode I still got the emails and the order arrived in the store. If you got none of these check that you have entered all the info in the 2checkout control panel and settings are okay in store.

Hope this helps.

23 Mar 2009, 8:27 AM
#11
norkhame avatar

norkhame

New Zenner

Join Date:
Mar 2009
Location:
Vientiane, Laos
Posts:
1
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Dear all,

I have problem with 2CO redirect page. What type of script page should we add in redict page from 2checkout.com to page checkout_success.php
Is there any possibility to link final page of 2CO to page checkout_success.php

Please to help, thank you so much in advance for your help. :clap:

I am using Zen Cart 1.38 and my website is www.ehandmadeshop.com

I am looking forward to hearing from you.
Best regards,
Vieng

13 Jul 2009, 9:17 AM
#12
lifeiq avatar

lifeiq

New Zenner

Join Date:
Jul 2009
Posts:
7
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

How do we link our Zen Cart to our 2checkout account?
We are on a ssl secure site.
Regards.
Olanrewaju

13 Jul 2009, 7:52 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 2Checkout Direct Return Update

Get the module for 2checkout
Follow the instructions and install it.

Once installed correctly - go to your admin and enable and configure it with your details

admin > modules > payment > 2checkout > edit > complete the details

14 Jul 2009, 6:48 AM
#14
lifeiq avatar

lifeiq

New Zenner

Join Date:
Jul 2009
Posts:
7
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Thanks once again. I will sit with a programmer to do this today. I will definitely give you a cheering news of success. I thank you immensely for your help.
Without people like you where are we neophytes going to be?
Utmost regards.

21 Jul 2009, 4:00 AM
#15
legacy2009 avatar

legacy2009

New Zenner

Join Date:
Jun 2009
Posts:
24
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

I installed the module on version 1.3.8 and followed the instructions, yet I'm getting an error:

1364 Field 'return_md5' doesn't have a default value
in:
[INSERT INTO 2checkout (start_time, status, amount, session_id) VALUES
(now(), 'Requested', '21.94', '040sjp9an6gnamrqmmclc6att0')]

I've tried reapplying the sql patch to my mysql database, tried reinstalling the asp modules, nothing changes the error from occuring.

Has anyone else run into this error and found a fix?!?!?

Curt

9 Sep 2009, 3:45 PM
#16
tvfox avatar

tvfox

New Zenner

Join Date:
Sep 2009
Posts:
1
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

hi, I installed the module on version 1.3.8, show scuess! so , i test checkout , at step 2 show : There has been an error processing your credit card. Please try again.

but next ,next ,sucess!

please help me ? 3 days ,i real hard !:frusty:

11 Sep 2009, 3:09 AM
#17
sreid1000 avatar

sreid1000

New Zenner

Join Date:
Sep 2009
Posts:
1
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

My site is mensuitsandbedding.com. What does the below error mean for 2checkout?? I inserted the 2 files and uploaded csv. Please Help!!! The 271.89 is the cart total. I'm confused.

1146 Table 'mensuits_zc1.TABLE_2CHECKOUT' doesn't exist
in:
[INSERT INTO TABLE_2CHECKOUT (start_time, status, amount, session_id) VALUES (now(), 'Requested', '271.89', '6a73842bc7319bf56e5762c129445966')]

12 Sep 2009, 6:02 PM
#18
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 2Checkout Direct Return Update

1146 Table 'mensuits_zc1.TABLE_2CHECKOUT' doesn't exist
in:
[INSERT INTO TABLE_2CHECKOUT (start_time, status, amount, session_id) VALUES (now(), 'Requested', '271.89', '6a73842bc7319bf56e5762c129445966')]
The sql patch is/assumes that you have a normal install without table prefixes.

You will have to manually edit it to add the prefix and apply it again to create the correctly named table(s)

12 Sep 2009, 7:14 PM
#19
kmedia avatar

kmedia

New Zenner

Join Date:
Aug 2009
Posts:
40
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Does anyone know if the 2checkout module is compatible with Zen Cart v1.3.8? I can't seem to find any info on that (other than someone having trouble getting it to work) and I am considering using 2checkout.

Thanks!

13 Sep 2009, 6:57 PM
#20
kmedia avatar

kmedia

New Zenner

Join Date:
Aug 2009
Posts:
40
Plugin Contributions:
0

Re: 2Checkout Direct Return Update

Anyone know about this? I am leaning towards PayPal at the moment, but I want to be sure I have fully considered all options before I make my final choice!

Thank you!