Skip to content

Charge_Redirect

Jacob McConnell edited this page Jun 10, 2014 · 2 revisions

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 customer 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

####Returns

Automatically passes sale to 2Checkout using header redirect.

####Example Usage:

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

Twocheckout_Charge::redirect($args);
Clone this wiki locally