Page 1 of 1
Paypal
Posted: Wed Jun 20, 2007 9:47 pm
by tecktalkcm0391
I am so confused on how to do a PayPal checkout with PHP. With the Standard version, can I (or can I not) set it up so that there is no need to have a page just to go click here to pay with a bunch of hidden fields of info to pass to PayPal? Also, can I send a user to there site to the page that they just enter their credit card, not the page where it advertises "Make or login to Paypal!" with the little "Continue" for not making an account. Finally, can I send a gift certificate number (one made through paypal) to paypal, and do they really need an account to do so?
Posted: Thu Jun 21, 2007 2:31 am
by Gente
No. Users don't need any account to make order in your site.
In your site you just put the form:
Code: Select all
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" value="_xclick" name="cmd"/>
<input type="hidden" value="your@business.name" name="business"/>
<input type="hidden" value="1" name="no_shipping"/>
<input type="hidden" value="0" name="tax"/>
<input type="hidden" value="25.00" name="amount"/>
<input type="hidden" value="USD" name="currency_code"/>
<input type="hidden" value="US" name="lc"/>
<input type="hidden" value="Gift Certificate" name="item_name"/>
<input type="hidden" value="CHCAL" name="item_number"/>
<input type="hidden" value="http://www.yoursite.com/return.php" name="return"/>
<input type="hidden" value="http://www.yoursite.com/cancel.php" name="cancel_return"/>
<input type="hidden" value="http://www.yoursite.com/notify.php" name="notify_url"/>
<input type="hidden" value="1" name="custom"/>
<input type="submit" value="Pay"/>
</form>
After user submit this form he will go to paypal site where he just have to fill his billing information and credit card.
As I remember it's possible to create paypal account if you (customer) use paypal very often, but it isn't required.
Also you can try to use PayPal API
https://www.paypal.com/IntegrationCente ... ource.html
Posted: Thu Jun 21, 2007 1:50 pm
by Technocrat
If you want to experiment you can go to
http://www.sandbox.paypal.com and signup
Then change:
https://www.paypal.com/cgi-bin/webscr
to:
https://www.sandbox.paypal.com/cgi-bin/webscr
Now you can test all you want without using real accounts.
The only way to verify that a purchase sent through 100% is by using IPN, which is sort of a pain.
Posted: Thu Jun 21, 2007 4:27 pm
by tecktalkcm0391
Thanks! But when I sent the form to the paypal website, it shows really big "Login to paypal" on the left. and only a small link to continue with a credit card.
Posted: Thu Jun 21, 2007 5:09 pm
by Gente
Try to click 'buy' on this site for example.
http://www.markelsoft.com/html/buy_using_paypal.html
Do you see the same page?
Posted: Thu Jun 21, 2007 8:28 pm
by tecktalkcm0391
Nope.

I need it the way I have it because its a shopping cart, and all of the items are being forwarded to Paypal
I am using "_cart" for the "cmd" value, should I be using something else?
Posted: Fri Jun 22, 2007 2:16 am
by Gente
tecktalkcm0391 wrote:I am using "_cart" for the "cmd" value, should I be using something else?
So you didn't ever try my example...
Try to use it and find out what is the difference.
For example I propose '_xclick' as value of 'cmd'.
Posted: Fri Jun 22, 2007 11:18 am
by tecktalkcm0391
Gente wrote:tecktalkcm0391 wrote:I am using "_cart" for the "cmd" value, should I be using something else?
So you didn't ever try my example...
Try to use it and find out what is the difference.
For example I propose '_xclick' as value of 'cmd'.
I didn't try it, because it was using a buy button. I didn't think it was going to do the shopping cart. I'm trying it now...
EDIT: It didn't work, it gave me "Please provide an amount and click Update Totals." on paypal's site..
Posted: Sun Jun 24, 2007 8:32 am
by Gente
Oh... And in my example you sure couldn't find it...
