Skip to content

Checkout_Link

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

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

##Method

###link

Use automatically pass the buyer and sale to 2Checkout.

####Arguments

####Returns

Purchase query string from the parameters passed in.

####Example Usage:

require "sinatra"

get '/' do
  @@form = Twocheckout::Checkout.link({ 'sid' => '1817037', 'mode' => '2CO','li_0_name' => 'Example Product', 'li_0_price' => '1.00'})
  @@form
end

####Example Response:

https://www.2checkout.com/checkout/spurchase?sid=1817037&mode=2CO&li_0_name=Example+Product&li_0_price=1.00
Clone this wiki locally