Jump to content

2checkout version 2 upgrade??


Guest cazey43

Recommended Posts

Guest cazey43

recently ive gotten a bunch of emails telling me to update to version 2. Is cube cart going to do this ???

i need to get on this because they gave me a final notice today

let me know

Link to comment
Share on other sites

If I'm still running CC2, below 2.0.7 how can I can upgrade the 2checkout gateway? I looked at the code for the 2co gateway in CC3 and it has a lot more to it than what I see in my version of CC. This is all I have for 2CO in secure.php:

// 2CHECKOUT.COM

// data to be sent in order to make payments with 2CheckOut

if ($gateway=="2Checkout")

	{	

  $sql_select = mysql_query( "select * from ".$prefix."store_gateways where gateway='2Checkout'");

  

 	 while ($row = mysql_fetch_array($sql_select))

    {

   	 $cust1 = $row["cust1"]; 

    }



  echo"<form target=\"_self\" action=\"https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c\" name=\"SecureForm\" method=\"post\">

 	 <input type=\"hidden\" name=\"sid\" value=\"$cust1\">

 	 <input type=\"hidden\" name=\"cart_order_id\" value=\"$cart_order_id\">

 	 <input type=\"hidden\" name=\"total\" value=\"$payable\">

 	 <input type=\"hidden\" name=\"card_holder_name\" value=\"$name\">

 	 <input type=\"hidden\" name=\"street_address\" value=\"$add_1 $add_2\">

 	 <input type=\"hidden\" name=\"city\" value=\"$town\">

 	 <input type=\"hidden\" name=\"state\" value=\"$county\">

 	 <input type=\"hidden\" name=\"session\" value=\"$session\">

 	 <input type=\"hidden\" name=\"country\" value=\"$country\">

 	 <input type=\"hidden\" name=\"zip\" value=\"$postcode\">

 	 <input type=\"hidden\" name=\"phone\" value=\"$phone\">

 	 <input type=\"hidden\" name=\"email\" value=\"$email\">

 	 <input type=\"hidden\" name=\"demo\" value=\"$test\">

  </form>";  

	}

Link to comment
Share on other sites

Guest rhyan

What version of CubeCart are you running? I would recommend upgrading your cart to 2.0.7 step by step so you don't run into any problems. Be sure you back up your files before making changes.

Here is the section for the 2CO update from the 2.0.7 upgrade instructions.

6. 2CO Perameters Update

///////////////////////////////

// Open secure.php

////////

Find Line 207:

if($cust1 > 200000){

	

	echo	"<form target=\"_self\" action=\"https://www2.2checkout.com/2co/buyer/purchase\" name=\"SecureForm\" method=\"post\">";

	

	} else {

	

	echo	"<form target=\"_self\" action=\"https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c\" name=\"SecureForm\" method=\"post\">";



	}

  

	echo	"<input type=\"hidden\" name=\"sid\" value=\"$cust1\">

 	 <input type=\"hidden\" name=\"cart_order_id\" value=\"$cart_order_id\">

 	 <input type=\"hidden\" name=\"total\" value=\"$payable\">

 	 <input type=\"hidden\" name=\"card_holder_name\" value=\"$name\">

 	 <input type=\"hidden\" name=\"street_address\" value=\"$add_1 $add_2\">

 	 <input type=\"hidden\" name=\"city\" value=\"$town\">

 	 <input type=\"hidden\" name=\"state\" value=\"$county\">

 	 <input type=\"hidden\" name=\"session\" value=\"$session\">

 	 <input type=\"hidden\" name=\"country\" value=\"$country\">

 	 <input type=\"hidden\" name=\"zip\" value=\"$postcode\">

 	 <input type=\"hidden\" name=\"phone\" value=\"$phone\">

 	 <input type=\"hidden\" name=\"email\" value=\"$email\">

 	 <input type=\"hidden\" name=\"demo\" value=\"$test\">

  </form>";




Replace with:


echo	"<form target='_self' action='https://www2.2checkout.com/2co/buyer/purchase' name='SecureForm' method='post'>";

	

	// 2co now requires all the products to be submit too

	echo	$extra2COVars;

	



	echo	"<input type='hidden' name='sid' value='".$cust1."'>

 	 <input type='hidden' name='cart_order_id' value='".$cart_order_id."'>

 	 <input type='hidden' name='total' value='".$payable."'>

 	 <input type='hidden' name='card_holder_name' value='".$name."'>

 	 <input type='hidden' name='street_address' value='".$add_1." ".$add_2."'>

 	 <input type='hidden' name='city' value='".$town."'>

 	 <input type='hidden' name='state' value='".$county."'>

 	 <input type='hidden' name='country' value='".$country."'>

 	 <input type='hidden' name='zip' value='".$postcode."'>

 	 <input type='hidden' name='phone' value='".$phone."'>

 	 <input type='hidden' name='email' value='".$email."'>

 	 <input type='hidden' name='demo' value='$test'>

 	 <input type='hidden' name='ship_name' value='".$name_d."'>

 	 <input type='hidden' name='ship_street_address' value='".$add_1_d." ".$add_2_d."'>

 	 <input type='hidden' name='ship_city' value='".$city_d."'>

 	 <input type='hidden' name='ship_state' value='".$county_d."'>

 	 <input type='hidden' name='ship_zip' value='".$postcode_d."'>

 	 <input type='hidden' name='ship_country' value='".$country_d."'>

 	 </form>";




Find Line 152:


$title = addslashes($title);




Directly Above This Add:


// BUILD EXTRA PARAMS FOR 2CO HERE TO SAVE EXTRA SQL STATEMENT

$extra2COVars .= "<input type='hidden' name='c_prod_".$x."' value='".$product.",".$quantity."' />

<input type='hidden' name='id_type_".$x."' value='".$product."' />

<input type='hidden' name='c_name_".$x."' value='".$title."' />

<input type='hidden' name='c_description_".$x."' value='".$title."' />

<input type='hidden' name='c_price_".$x."' value='".$price."' />

<input type='hidden' name='c_tangible_".$x."' value='Y' />";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...