Blog

After the successful completion of a sale 2Checkout.com can return the customer and sale parameters to a script or page on your site. This URL can be entered on the Site Management page by clicking the Account tab followed by the Site Management sub-category.

Specifying an approved URL at the account level will direct all customers to the same URL after a successful checkout. An approved URL can also be set at the product level by providing an approved URL when creating the product, or by clicking the blue Edit icon under the Actions column for the product on the Products page in your account. Product level approved URLs override the account level approved URL and can direct the customer to a specific location for that product, such as a download page. If multiple products are ordered the customer is provided with multiple approved URLs allowing them to access each product in the sale.

You may also choose to pass the approved URL on the fly by using the x_receipt_link_url parameter. This parameter will override both product and account level approved URLs. The value passed must match the domain registered to the account.

If you are returning the customer to a script on your end it is important to note that parameter information will typically be returned by POST. Parameters however will be returned by GET if either the Header Redirect method is selected or the Plug-and-Play parameter set is used and multiple products are purchased at the same time. Thus if you are using a product level approved URL your return script should be able to handle both methods without breaking. Please Note: You must also have a script set up as the return URL if you wish to receive the pass back information. If you would like this information returned to you, make sure that your return URL ends in the extension of a script. If your return URL ends in any of the following extensions, then pass back will NOT occur, but the customer will still be returned there : .htm, .html, .com, .zip, .pdf, .rar, .doc

Finally, you will determine the method in which your customer is returned to the approved URL. 2Checkout.com provides three methods. You may send the customer to our order processed page which will display a Click here to finalize your order button to redirect the customer, you may bypass the order processed page using a header redirect or you can immediately display your approved URL to the customer while they remain on our server. Your return method can be selected on the Site Management page.

With the Return Method set to Given links back to my website, the customer will be taken to our Order Processed page after completing a successful purchase. This page will feature a Click Here to Finalize Your Order button. When clicked the customer and collected sale parameters will be directed to the provided approved URL.

With the Return Method set to Direct Return, sale parameters will be posted automatically to the approved URL while fetched by our server and displayed to the customer. When using this Direct Return function the URL will be masked to the customer, appearing to still be on the 2Checkout.com domain. This method can be used with redirects as long as each page outputs content more than 255 characters to the browser. If Direct Return encounters a page that redirects without outputting content the process will fail and the customer will be sent to our standard Order Processed page. This occurs usually with a header redirect, specifically content less then 255 characters. This is a common issue as many developers will set their approved URL to a script that processes the return sales parameters then silently forwards the customer to another page. This is usually a thank you or download page for intangible products. The best solution is to handle all post-order processing on the page set as your approved URL, including the thank you message. If no redirects are used, meaning the URL is masked by our servers, then relative links will not point to the correct location. This can be corrected with the use of absolute paths on the approved URL page or by simply using a base tag in the head of the document to provide a reference for the relative paths.

With the Return Method set to Header Redirect the customer will be immediately returned to your approved URL. Using this method, the sale parameters will be returned along with the customer using the GET method.

If you have problems with the return process you’re welcome to contact us at techsupport@2co.com to assist with troubleshooting the issue. Please Note: If you do not specify an approved URL at the account level, product level, or with the x_receipt_link_url parameter the customer will remain on the 2Checkout Order Processed page upon completion of the order.

Posted in Passbacks and Returns

Tagged , , ,