I received a tutorial requests from my reader that asked to me how to implement payment gateway system with Paypal API. In this post I want to explain how to work with Paypal Sandbox test accounts for payment system development and sending arguments while click buy now button. It’s simple and very easy to integrate in your web projects.

Download Script
Live DemoSample database design for Payment system. Contains there table users, products and sales.

Users
CREATE TABLE `users` (
`uid` int(11) AUTO_INCREMENT PRIMARY KEY,
`username` varchar(255) UNIQUE KEY,
`password` varchar(255),
`email` varchar(255) UNIQUE KEY,
)
`uid` int(11) AUTO_INCREMENT PRIMARY KEY,
`username` varchar(255) UNIQUE KEY,
`password` varchar(255),
`email` varchar(255) UNIQUE KEY,
)
Products
CREATE TABLE `products`
(
`pid` int(11) AUTO_INCREMENT PRIMARY KEY,
`product` varchar(255),
'product_img` varchar(100),
`price` int(11),
`currency` varchar(10),
)
(
`pid` int(11) AUTO_INCREMENT PRIMARY KEY,
`product` varchar(255),
'product_img` varchar(100),
`price` int(11),
`currency` varchar(10),
)
Sales
CREATE TABLE `sales`
(
`sid` int(11) AUTO_INCREMENT PRIMARY KEY,
`pid` int(11),
`uid` int(11),
`saledate` date,
`transactionid` varchar(125),
FOREIGN KEY(uid) REFERENCES users(uid),
FOREIGN KEY(pid) REFERENCES products(pid)
)
(
`sid` int(11) AUTO_INCREMENT PRIMARY KEY,
`pid` int(11),
`uid` int(11),
`saledate` date,
`transactionid` varchar(125),
FOREIGN KEY(uid) REFERENCES users(uid),
FOREIGN KEY(pid) REFERENCES products(pid)
)
Step 1
Create a Paypal Sandbox account at https://developer.paypal.com/Step 2
Now create test accounts for payment system. Take a look at Sandbox menu left-side top Sandbox->Test Accounts
Step 3
Here I have created two accounts Buyer (personal) and Seller (merchant/business) 
products.php
Contains PHP code. Displaying records from products table product image, product name and product price. Here you have to give your business(seller) $paypal_id id. Modify paypal button form return and cancel_return URLs.
<?php
session_start();
require 'db_config.php';
$uid=$_SESSION['uid'];
$username=$_SESSION['username'];
$paypal_url='https://www.sandbox.paypal.com/cgi-bin/webscr'; // Test Paypal API URL
$paypal_id='your_seller_id'; // Business email ID
?>
<body>
<h2>Welcome, <?php echo $username;?></h2>
<?php
$result = mysql_query("SELECT * from products");
while($row = mysql_fetch_array($result))
{
?>
<img src="images/<?php echo $row['product_img'];?>" />
Name: <?php echo $row['product'];?>
Price: <?php echo $row['price'];?>$
// Paypal Button
<form action='<?php echo $paypal_url; ?>' method='post' name='form<?php echo $row['pid']; ?>'>
<input type='hidden' name='business' value='<?php echo $paypal_id; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' value='<?php echo $row['product'];?>'>
<input type='hidden' name='item_number' value='<?php echo $row['pid'];?>'>
<input type='hidden' name='amount' value='<?php echo $row['price'];?>'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='cancel_return' value='http://yoursite.com/cancel.php'>
<input type='hidden' name='return' value='http://yoursite.com/success.php'>
<input type="image" src="https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">
</form>
<?php
}
?>
</body>
session_start();
require 'db_config.php';
$uid=$_SESSION['uid'];
$username=$_SESSION['username'];
$paypal_url='https://www.sandbox.paypal.com/cgi-bin/webscr'; // Test Paypal API URL
$paypal_id='your_seller_id'; // Business email ID
?>
<body>
<h2>Welcome, <?php echo $username;?></h2>
<?php
$result = mysql_query("SELECT * from products");
while($row = mysql_fetch_array($result))
{
?>
<img src="images/<?php echo $row['product_img'];?>" />
Name: <?php echo $row['product'];?>
Price: <?php echo $row['price'];?>$
// Paypal Button
<form action='<?php echo $paypal_url; ?>' method='post' name='form<?php echo $row['pid']; ?>'>
<input type='hidden' name='business' value='<?php echo $paypal_id; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' value='<?php echo $row['product'];?>'>
<input type='hidden' name='item_number' value='<?php echo $row['pid'];?>'>
<input type='hidden' name='amount' value='<?php echo $row['price'];?>'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='cancel_return' value='http://yoursite.com/cancel.php'>
<input type='hidden' name='return' value='http://yoursite.com/success.php'>
<input type="image" src="https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">
</form>
<?php
}
?>
</body>
success.php
Paypal payment success return file. Getting Paypal argument like item_number. Paypal data success.php?tx=270233304D340491B&st=Completed&amt=22.00&cc=USD&cm=&item_number=1
<?php
session_start();
require 'db_config.php';
$uid = $_SESSION['uid'];
$username=$_SESSION['username'];
$item_no = $_GET['item_number'];
$item_transaction = $_GET['tx']; // Paypal transaction ID
$item_price = $_GET['amt']; // Paypal received amount
$item_currency = $_GET['cc']; // Paypal received currency type
//Getting product details
$sql=mysql_query("select product,price,currency from producst where pid='$item_no'");
$row=mysql_fetch_array($sql);
$price=$row['price'];
$currency=$row['currency'];
//Rechecking the product price and currency details
if($item_price==$price && item_currency==$currency)
{
$result = mysql_query("INSERT INTO sales(pid, uid, saledate,transactionid) VALUES('$item_no', '$uid', NOW(),'$item_transaction')");
if($result)
{
echo "<h1>Welcome, $username</h1>";
echo "<h1>Payment Successful</h1>";
}
}
else
{
echo "Payment Failed";
}
?>
session_start();
require 'db_config.php';
$uid = $_SESSION['uid'];
$username=$_SESSION['username'];
$item_no = $_GET['item_number'];
$item_transaction = $_GET['tx']; // Paypal transaction ID
$item_price = $_GET['amt']; // Paypal received amount
$item_currency = $_GET['cc']; // Paypal received currency type
//Getting product details
$sql=mysql_query("select product,price,currency from producst where pid='$item_no'");
$row=mysql_fetch_array($sql);
$price=$row['price'];
$currency=$row['currency'];
//Rechecking the product price and currency details
if($item_price==$price && item_currency==$currency)
{
$result = mysql_query("INSERT INTO sales(pid, uid, saledate,transactionid) VALUES('$item_no', '$uid', NOW(),'$item_transaction')");
if($result)
{
echo "<h1>Welcome, $username</h1>";
echo "<h1>Payment Successful</h1>";
}
}
else
{
echo "Payment Failed";
}
?>
Positive approach
cancel.php
Paypal API cancel_return file.
<?php
session_start();
$username=$_SESSION['username'];
echo "<h1>Welcome, $username</h1>";
echo "<h1>Payment Canceled</h1>";
?>
session_start();
$username=$_SESSION['username'];
echo "<h1>Welcome, $username</h1>";
echo "<h1>Payment Canceled</h1>";
?>
Negative approach
Step 4
When your web application test payment system workflow is completed. Change the form action development API URLs to original API URLs and give valid $paypal_id seller email id.$paypal_url='https://www.sandbox.paypal.com/cgi-bin/webscr';
to
$paypal_url='https://www.paypal.com/cgi-bin/webscr';
to
$paypal_url='https://www.paypal.com/cgi-bin/webscr';









nice, i have some project that needed to integrate with PP, and you make this tuts :)
great :)
nice !! :-) ... you are a genius ... you always make complicated things easier ...
How we can get the commission for each sales.. mean if some one sells any products using my website i need to take 5% from the total amount of the product. How it can be done in Paypal. so that 5% amount is automatically transferred to my paypal account.
Well done. Thank you guy.
Hi srini, nice tute as usual..:) is creating test account on paypal free or payable?
Srinivas, I'm curious about your database graph. What do you use when designing databases?
Hey Great tutorial, Srinivas, thank you from Perú.
Omg.... Asians rock!
Great post Srinivas... we like these kind of innovative posts. Thanks a lot.
SQL Injection, no verification that a call to success.php actually came from PayPal (and is valid)...words fail me.
this tutorial ROCKS! thank you very much dude :D
@Dan Mysql Workbench for database ER diagrams.
waw..thanks for sharing Srinivas..:)
You have a big logical error in your code. You don't check what your code in success.php called from PayPal. Anyone can create html file (at the his own PC) with code like next:
<--FORM action="yoursite/success.php">
<--input type="text" name="item_number" value="Item1">
<--input type="submit"><--/FORM>.
This code calls to your page success.php and send there "item_number=Item1". And your page thinks what PayPal payment is accepted. But operation performed without PayPal.
thanks for sharing, paypal API is actually pretty complicated because there are too many options. We faced these issues while doing the integrations for http://www.mobikwik.com
hi,
i tried your code and it worked fine for me, the only error i got is i am not getting the product id after successful transaction and getting "Payment Error" while inserting record in database...
Hey Srini,
i got the same error like ashish...
Nice post. I solved my problem very well.
Thanks
very nice
Modified 'success.php' file code. Re-checking the product price and currency details
hi srini, my question is .. in step 1 we need to register for the sandbox account.. is it paid account ??
@Sreevathsa
It's free just test account
hey Sri its not TEXT ACCOUNT its TEST Brother I think a little typo mistake is there.. :)
i am confused - cant anyone just call the success.php page and post sales? Usually I would assume you need to use PayPal IPN or something - its a good example but I am not sure if this is practical?
For me its not safe, also the return url dont have transaction id for me.
Very Handy tuts :)
item_number. Paypal data success.php?tx=270233304D340491B&st=Completed&amt=22.00&cc=USD&cm=&item_number=1
what $_GET[???], is Quantity???
its post is nice but why are you using IPN for update database.
Please advice how to use this tutorail to protect digital file. if success able to download file if not protected digital file.
Hi. Thanks for the tutorial. Everything works fine, except the redirection to the success page after the payment. Paypal doesn't redirect, it only confirms the payment and shows a link: Back to Robert Kleinert's Teststore. When I click on that link Paypal redirects to success.php?merchant_return_link=Back+to+Robert+Kleinert's+Test+Store
Whats the problem here? Or is it only a sandbox problem?
Thanks.
nice info..
Dear Srinivas Tamada,
i have downloaded import database o.k, tested o.k all, only url of success it still success.php not added more params. did you shared not enought code ? please check. i'm trying with ipn and use curt of php to test with more code.
Same with Nguyen Hai Dang
Sanbox new accounts success redirection problem.
It was helpfull for me, however I think it is insecure to rely just on the data sent to the success.php file to verify the sale.
I added a field named 'verified' to the Sales table which defaults to '0'.
I then created a ipn.php file that is called by Paypal once the payment is received. This file then searches for the correct transactionid already on the table and changes the value of 'verified' to '1'.
This way you know the payment is legit because it's confirmed by Paypal itself. Otherwise people can just call the success.php directly and insert fake payments.
I think that having this is enough to make the process secure. Do you guys know of anything else I might be missing?
@Nguyen Hai dang
I had the same issue, add this to the process form:
input type='hidden' name='return_method' value='2'
This defines the method that is used to pass the params to success.php (1=GET, 2=POST). I think GET is the default but it wasn't working for me so I changed to POST and it now receives the data.
Hi,
Can you Please tell is there any script which can convert smarty files to core php files instead of doing manually it is taking lot of time to change the code manually.If you have any solution Please let me know soon.........
waiting for your response.........
I tried this demo.. working well, but when i tried the downloaded code, and customised it with my own details, i see that the payment is done.. but when it comes back to success.php, there is no parameter passed, and i receive the message: Payment Failed. Could not understand what is wrong.
@dskanth
Paypal Sanbox creating some problem with new registration accounts. Success page not redirecting well try to use my test merchant email.
thank you from LA. great tutorial!
thanks from LA!
Awsome tutorial it wrks in my web, buti need to pay several products but it only sends one, how can i do it?
Man I Love your Blog its fantastic what you explain here im not well in english language but everything is clearly for me thanks for this blog man.
hi dear Srinivas Tamada
its very use full tutorial for me thanks but i am having problem on succes.php page because when its return from paypal page it show me payment failed and data also not inserting in database please do tell me the solution as soon as possible i am waiting. thanks
and i want to know that if a user buy shirt on index page i will show him 0 value but when he came back after payment i want to show value 1 how it will done please tell
will you please tell me how it will done??
i want to show a "0" value in label when user comes first time on my site and after payment through paypal when he or she back on my site on i want to show a value "1" in label kindly help me as soon as posible
thanks
Maybe must add feature to download product and expired download link..
Thanks
Hi,
Nice tutorial it work properly when i set my return url: http://demos.9lessons.info/paypal/success.php.
But when i change it with my url for ex:
return url: http://localhost/paypal/success.php.
it not work properly i am also not getting any item_no value on the success.php file when i echo the query :
"select product,price,currency from producst where pid='$item_no'"
it give pid=''
what is the problem .
Please provide me a solution for it.
Hi Srinivas,
i send a feed back to you regarding this tutorial . It was my mistake. It working fine with your $paypal_id ='sriniv_1293527277_biz@inbox.com' but when i use my pay pal id marut_1321421584_biz@1solutions.biz
It not work properly what is the issue. Can anything we do in my pay-pal sand box account setting.
in this case we not get item_number and amt and all other thing what is the problem .
Please provide me the solution for it.
My mail id is marut0210@gmail.com
Hi, In my case, the user is not redirected back to my website after payment is completed. Is there another back end soluction to get notified of a transaction? I'm trying to configure IPN but I cannot find it on sandbox anymore.
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\paypal\success.php on line 15
Payment Failed
hi, Srinivas thanks for your tutorial.
it's great for me. First of all i had been the problem as @ashutosh Mishra too. now i can find the solution to redirect to the success.php page.
1. log in into Business mail
2. click on profile
3. Website payment preferences
in that, configure some points:
set Auto Return to On and type return URL address (e.g. http://localhost/paypal/success.php)
set Payment Data Transfer to On
I'm sorry if my English made you misunderstand.
really good to see this blog...
I need one help from how can i create test account for money booker payment gateway..
hi,i used your code but after transaction,i did not get any txnid,amount will you plz help me..i got message payment failed....
Hi
In my PayPal sandbox account, when I click "Pay Now" it display a link "Return to my Test Store".
But I want sandbox get the process of auto return.
Can we do this with PayPal Sandbox?
@ Srinivas,
I follow your code already. after user payed, the paypal did not redirect to my website so I can not get the transactionID, amount...
I tested with sanbox. Please help me.
Hi Srinivas,
It works fine with your $paypal_id ='sriniv_1293527277_biz@inbox.com' but when i use my email It not work properly what is the issue.
How can I get the paypaID? Do I need to config with paypal account setting?
Please provide me the solution with this problem.
Hi Seyha
Paypal sandbox updated new sample biz id not redirecting properly.
Hi, I used it but it live for Paypal Send box but it only show
Thanks for your order page of Paypal, not redirect to success.php and therefore does not insert record into sales table.
Hi, your code helped me to start my code with.
Facing a problem! What if a user clicks some other link (like: show my account details); our site will not be notified about payment and the payment will b deducted from user account and credited to store account. BUT our database will have no entry against it.
Any solution??
OMG, you save my time, thanks. love this tutorial.
Hi Srinivas Tamada,
I 'm Ok all of the steps,but in success.php it show me "Payment Failed" and it does not save sales table. Why? . That's a problem and please explain it. Thanks in advance.
Hi!
so the redirection problem is there in the sandbox accounts
but is the redirection problem also in the real accounts...
can some confirm this..
@Srinivas: awesum blog... really helped..
\m/
Hi Srinivas,
when i used your paypal id , paypal will redirect to success page(all working fine) but when i use my paypal id it's not redirect! so how to update my database?
When I do this, and paypal returns to the return url it does not post the info to the url like this "success.php?tx=270233304D340491B&st=Completed&amt=22.00&cc=USD&cm=&item_number=1"
it just goes to "success.php" why is that?
@Gurav, this is something I also want to know
Is it possible to pay the amount to two account at a single time?
I mean to say that when a person pays amount then his amount will be divided in two parts 95% of amount to the actual payment receiver and 5% to a default user(me).
need to explain more clearly dear
I am getting the following error
This recipient is currently unable to receive money
What should i do
Hay First of all thanks dude...
I try your demo code and its work properly but in final step i can't redirect on sucess.php pls replay fast...
Thanks again..
Hi Srinivas Tamada,thank u for update
I 'm Ok all of the steps,but in success.php it show me "Payment Failed" and it does not save sales table. Why? . That's a problem and please explain it. Thanks in advance.
nice work.......
Is there anyway to make it auto-redirect to the success page? Right now, the only way for their purchase to be added to the database is IF they actually click return to the website.
I actually figured out the previous redirect issue, needed to change something in my paypal settings. Now I am noticing none of the parameters are sent with the success.php so all of the info being input into the database is blank or 0. Any way to fix this so it gets the actual data?
Awesome!!!!! I never see on the web like this..!
It's excellent Srinivas.
@Nate:
Auto Return is turned off by default.
To turn on Auto Return:
Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears.
Click the Profile subtab.
The Profile Summary page appears.
Under the Selling Preferences column, click the Website Payment Preferences link. The Website Payment Preferences page appears
Under Auto Return for Website Payments, click the On radio button to enable Auto Return.
In the Return URL field, enter the URL to which you want your payers redirected after they complete their payments.
NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.
Scroll to the bottom of the page, and click the Save button.
Raj
Thank You Man It Is Grate...
Really, it's amazing tutorial for us...
Thank You....very much G...
Awesome bro.. helped me like HELL!!
Great tutorial.. Thanks a bunch!! Didn't know Paypal transactions were so easy. :D
But it seems that the transaction ID and all are now being sent via email to the registered email address of the Paypal user. So we won't be needing the `sales` table part :D
Someone please help me i am new in php and wnt to play this paypa script but when i go to import the downloaded file paypal.sql it gives error like this:
CREATE TABLE IF NOT EXISTS `sales` (
`sid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`pid` int( 11 ) DEFAULT NULL ,
`uid` int( 11 ) DEFAULT NULL ,
`saledate` date DEFAULT NULL ,
'transactionid'varchar( 125 ) ,
PRIMARY KEY ( `sid` ) ,
KEY `pid` ( `pid` ) ,
KEY `uid` ( `uid` )
) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT =12;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''transactionid' varchar(125),
PRIMARY KEY (`sid`),
KEY `pid` (`pid`),
K' at line 12
please help me
i will be very thankful to all of you...
Sir i have one more problem please help me i want to create pdf filefrom the "registered.php" using FPDF CLASS LIBRARY but when click on "create pdf" button it only convert the index to pdf but not values of their indexes is displaying.....please help me...this is my conversion code..
AddPage();
$pdf->SetFont('Arial','B',10);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial','B',10);
$pdf->Cell(20,15,"No");
$pdf->Cell(20,15,"name");
$pdf->Cell(20,15,"dob");
$pdf->Cell(20,15,"email");
$pdf->Cell(20,15,"address");
$pdf->Cell(20,15,"mobile");
$pdf->Cell(15,15,"gender");
$pdf->Cell(20,15,"country");
$pdf->Cell(20,15,"city");
//$pdf->Cell(20,15,"remarks");
$pdf->Cell(20,15,"image");
$pdf->Ln();
$pdf->Cell(1050,3,"--------------------------------------------------------------------------------------------------------------------------------------------------------");
$query = "SELECT * FROM register_user";
$result = mysql_query($query, $db) or die(mysql_error());
//$row = mysql_fetch_assoc($result);
//$totalRows_rsReportData = mysql_num_rows($result);
$No = 0;
while($row=mysql_fetch_assoc($result))
{
$No = $No + 1;
$name = $row['name'];
$dob = $row['dob'];
$email = $row['email'];
$address= $row['address'];
//$mobile = $row['mobile'];
//$gender = $row['gender'];
//$country= $row['country'];
//$city = $row['city'];
//$remarks= $row['remarks'];
//$image = $row['image'];
$pdf->Cell(5,15,"{$No}");
$pdf->Cell(20,15,"{$name}");
$pdf->Cell(20,15,"{$dob}");
$pdf->Cell(20,15,"{$email}");
$pdf->Cell(20,15,"{$address}");
//$pdf->Cell(20,15,"{$mobile}");
//$pdf->Cell(15,15,"{$gender}");
//$pdf->Cell(20,15,"{$country}");
//$pdf->Cell(20,15,"{$city}");
//$pdf->Cell(20,15,"{$remarks}");
//$pdf->Cell(20,15,"{$image}");
foreach($row as $value)
{
//echo $value;
}
}
$pdf->Output();
?>
How to fix this error
Undefined index: item_number in C:\wamp\www\mvc\view\success.php on line 13
Undefined index: tx in C:\wamp\www\mvc\view\success.php on line 14
Undefined index: amt in C:\wamp\www\mvc\view\success.php on line 15
Notice: Undefined index: cc in C:\wamp\www\mvc\view\success.php on line 16
any Help is apperciatable
Why this one
Notice: Undefined index: item_number \success.php on line 17
Notice: Undefined index: tx in
Notice: Undefined index: amt in C:\xampp\htdocs
Notice: Undefined index: cc in C:\xampp\htdocs\cubexsweatherly\paypal_lesson\success.php on line 20
please tell me how to turn on Auto Return for testing account?i have created 2 account as business and personal as preconfigured accounts.
another error on success php
if($item_price==$price && item_currency==$currency)
item_currency is missing a $
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\paypal(2.0)\products.php on line 40
getting this error pls help
All went perfectly..just one error while returning from paypal page.Got following error:
The requested URL /paypal/success.php was not found on this server.
Thanx for d tutorial
Hi
When i tried live demo from my browser its showing https://www.sandbox.paypal.com/cgi-bin/webscr page only reset of the things not coming , could you please advise any thing i missed out.
This code can't user for production site.Use Paypal IPN to receive payment notification.
http://code.google.com/p/paypal-ipn-class-php/
Man you saved my life many times already! :D
i am using the same code as mentioned but i my success url transactiion id is not coming .. what to do ?
please help
I am not getting the transction id after successful payment..
what to do ?
please help
Hi shirni..
I am using same code as you write in above post. But I am not receiving any parameters in my url. So can you please help me in this problem?
not working for me. redirect url not passing data.. Please help me
i had the same issue with paypal not auto returning or getting data about transaction.
if you log into your sandbox Seller account. click on profile and go to 'selling preferences' then in the list click on 'Website Payment Preferences' in here you have a few options, you need to set Auto Return to ON also make sure Payment Data Transfer is set to ON - this will give you the transaction id, the amount etc.
forgot to say thanks @Srinivas Tamada :D
can't get the transaction number..when back to sucess.php please help...
How to pass other custom values to paypal... because i want to save more than 5 values in success.php from client
thanks for the tutorial, i have a problem on success.php i get Payment Failed. and am using sandbox accounts where i can't selling preferences to configure auto-return urls.
if any would help me i would be greatful
hi !
I am already used your paypal payment system.used send box system.payment successfully transfer one paypal to another paypal account.but database dont updated the payment transaction. please help me how to solve the problem.I am already follow your direction. But I cant solve.please help me.
i found this very informative thanks for sharing..
hi i liked ur post a lot and was helpful too.can u provide same example in jsp?
this was very helpful thanks but can u give same example in jsp?
hi and one more thin i tried ur code myself in jsp the prob with it lik u shown in live demo wen one clicks buy button it takes them to login for sandbox and shows order summary,but in mine its not showing tat.its just showing login to continue.and don display order summary.
Awesome tutorial - ! good joob
Hi thank to share this video but i need paypal recurring payment method and get response with profile id. After that i want run cron on profile id to know this paypal is done or not every month..
we are going to use it in our classified sites...
A great way for transaction
Hi this is a great tutorial, quick thing i've got my sandbox set up and all working but when someone makes a payment it is going through ok on paypal but when you are directed back to the website its says payment failed. the information from paypal is not coming back to the website. Any ideas?
how to get responce automaticly from paypal ? plese explain
can you please expalin how to get responce automaticly on sucess.php or how to show all payment detail on own website page after payment ?
I get this error:
Parse error: syntax error, unexpected '?' in C:\Program Files\EasyPHP-12.1\www\my portable files\GotMerch\New Folder\products.php on line 21
Whats going on there like?
I'm impressed with the way you have condensed pages and pages of PayPal bumff into this concise and easily understood article! Well done!
P.S. Could you possibly explain how we can integrate a site to include credit card payment via PayPal? Not all our visitors have PayPal Accounts, but they do have credit cards...
nice code, this really help me
Can we refund any transaction by using same kind of form or is that compulsory to use API for refund. Please suggest.