Language

2Checkout Documentation

Redirect

To pass a sale to your custom checkout page, you use one of the methods provided in the Twocheckout_Charge class. This class provides you you with several methods to pass the sale and the buyer to 2Checkout.

Method

redirect

Use to automatically pass the buyer and the sale to 2Checkout. Note: Header redirect must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.

Arguments

  • array parameters

Returns

Automatically passes sale to 2Checkout using header redirect.

Example Usage:

$params = array(
    'sid' => '1817037',
    'mode' => '2CO',
    'li_0_name' => 'Test Product',
    'li_0_price' => '0.01'
);

Twocheckout_Charge::redirect($params);