Web Hosting Talk







View Full Version : Needing some help on 2checout


kentucky
03-26-2002, 03:46 PM
Greetings all,
I am trying to setup 2CheckOut.com for my site. One thing I have yet to figure out, is how do get the customers details. eg. domain name, etc. I really like the way it is done at hostit365.com

Any help would be greatly appreciated. :)

AcuNett
03-26-2002, 04:15 PM
Use a CGI form processor.

kentucky
03-26-2002, 04:41 PM
Using php or cgi wasn't the issue I have. I just need to know how to get the account information sent to me, and the order conformation sent to me and the client, and send the order to 2checkout. And how to intergate this all together :)

jffmrk
03-26-2002, 04:59 PM
You can put whatever you want in the "merchant_order_id" variable and pass it to 2CheckOut. 2CheckOut will collect the name, address, phone, credit card and then can call a pass back routine (configure this in the 2CheckOut sellers area) that will give you all the details (no cc info of course) of the transaction and if it was approved or not.

This thread basically said the same thing. I posted some code on how I email myself of the order confirmation after 2CheckOut processes the order:
http://webhostingtalk.com/showthread.php?s=&threadid=35008

Hope that helps.

-Jeff

kentucky
03-26-2002, 06:55 PM
How Feasible would this be:

1. They select their plan, then they fill in thier domain name, email, and the other things specific to the accounts (not thier cc or such).
2. Then that is sent to me, then they are automaticly directed to the order form on 2checouts website?

jffmrk
03-26-2002, 07:53 PM
Originally posted by kentucky
How Feasible would this be:

1. They select their plan, then they fill in thier domain name, email, and the other things specific to the accounts (not thier cc or such).
2. Then that is sent to me, then they are automaticly directed to the order form on 2checouts website?
That's pretty much the process I use. I collect account info, send myself an email with this email, send them to the 2CheckOut site, 2CheckOut calls a return script on my site and I send myself another email. This second email confirms that they paid and didn't browse away from the payment page.

Hope that helps.

-Jeff

TopDog07
03-26-2002, 10:52 PM
How would one go about intergating that into either a php order script or the cgi script? (sorry but when it comes to cgi/php shopping carts I am really a newbie)/.

TopDog07
03-26-2002, 10:54 PM
Same person, as kentucky but kentucky is my work computer and I had no way of getting my password (Forgot it) Sorry, wasn't trying to use multi. accounts on purpose.

xjeffx
03-27-2002, 09:05 AM
I found myself with the same problem after signing up. This is what I did.

1) make a file and call it order.php
2) fill it with the following code

<?
$to = "orders@xedgehosting.com";
$from_header = "From: $from";
$contents = "Name: $name\nE-mail: $from\nUsername: $username\nPassword: $pass1 / $pass2\nDomain name: $domain";
$subject = "Order";
if($pass1 == $pass2)
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header("Location: http://www.xedgehosting.com/signup3.html");
}
else
{
print("<HTML><BODY>Error, make sure you select a password and type the same one to verify it!!!");
print("</BODY></HTML>");
}
?>

3) feel free to steal the code from my website for the html form. Just click the signup link.

What this will do is email the name, email, username, password, verified password, and domain name to orders@xedgehosting.com. Of course you should change the email address to yours!

From there, it takes you to a 3rd page on my server that gives you the account selections and will take you to 2checkout's checkout page.

I hope I explained this clearly, if not shoot me a PM or email.

Good luck,
Jeffery Patch

(by the way, this was my first time writing php code!)

TopDog07
03-27-2002, 02:07 PM
Thanks :) Hopefully I can get this working...

btw, has anyone ever thought of kicking a computer? :stickout

4solutions
03-27-2002, 02:23 PM
Originally posted by TopDog21
btw, has anyone ever thought of kicking a computer? :stickout It's a daily ritual, here!

:D

TopDog07
03-27-2002, 03:57 PM
Does anyone know how I can do the following:

A form of some sort that would send me the clients details (such as domain name) and have maybe a list/menu box? where they select the plan they want and after it sends me thier info via the form it redirects them to the order page of the plan they selected. Any ideals? Thanks :confused:

jffmrk
03-27-2002, 05:05 PM
If you want to use the recurring bill feature with 2CheckOut you create the product type and set how often to bill the credit card. 2CheckOut lists a "product id" value that you can use in a link to direct people to this site. On the html side put in a drop down menu that has the different product ids you want to see:

<select name="pid">
<option value="1">Plan 1</option>
<option value="2">Plan 2</option>
</select>

On the order form, you can use xjeffx's code to email yourself the details. In the redirect part you can just redirect them to the 2CheckOut recurring billing URL:


// Sellers id is you 2CheckOut id.
$sid = "12345";

// You can use the time as an order id
$orderid = time();

// Redirect to the 2checkout site to buy product "pid" from the form
header("Location: https://www.2checkout.com/cgi-bin/crbuyers/recpurchase.2c?sid="
. $sid . "&product_id=" . $pid . "&merchant_order_id=" . $orderid);


Hope that makes sense.

xjeffx
03-27-2002, 05:39 PM
Originally posted by TopDog21
Does anyone know how I can do the following:

A form of some sort that would send me the clients details (such as domain name) and have maybe a list/menu box? where they select the plan they want and after it sends me thier info via the form it redirects them to the order page of the plan they selected. Any ideals? Thanks :confused:

isn't that what mine is doing?

kentucky
03-27-2002, 06:47 PM
I think I have it figured out :stickout Thanks all.