Hello Everybody!!!
I want to automate some paypal process.
I am writing code in PHP. BUT dont know anything about Paypal. And I cant understand their Documentation... Its all Greek Language for me.
What I know till now is adding pay now button. And adding add to cart button. But I am trying this. I have made a manual cart of my own....
What i want to do is simple >>>
I have a list of products in array. And on click of "checkout" I want to redirect visitor to PAYPAL Cart or Paying Page... along with the products and ovoiusly their prices.
Please someone suggest me the procedure... I will be very very thankfulll,,,
Paypal Automation !!!!
Moderator: General Moderators
Re: Paypal Automation !!!!
Sounds like you just want to dynamically create a paypal form? (just use PHP to fill in the forms values)
Or are you talking an IPN solution?
Or are you talking an IPN solution?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
-
rahul.pache
- Forum Newbie
- Posts: 9
- Joined: Thu Apr 10, 2008 4:07 am
Re: Paypal Automation !!!!
What is IPN solution ?
Re: Paypal Automation !!!!
In order to redirect to a page with product detailes in addition to the total amount you must use paypal pro. The simple paypal pay now button will only show total amount.
Re: Paypal Automation !!!!
paypal already has a cart. You dont want to use theirs?
If you already have a cart. You can use php to loop through your cart and create the cart for paypal
then
I am not sure if thats what you want since I really did not understand the question
If you already have a cart. You can use php to loop through your cart and create the cart for paypal
Code: Select all
foreach($mycart as $obj)
{
$paypalCart.= "<input type=\"hidden\" name=\"item_name_{$i}\" value=\"$obj->product_name\">\n"
."<input type=\"hidden\" name=\"amount_{$i}\" value=\"{$amount}\">\n"
."<input type=\"hidden\" name=\"quantity_{$i}\" value=\"{$obj->basket_quantity}\">\n"
."<input type=\"hidden\" name=\"on0_{$i}\" value=\"product_id\">\n"
."<input type=\"hidden\" name=\"os0_{$i}\" value=\"{$obj->product_id}\">\n";
}
Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
put other paypal html vars here
<?=$paypalCart?>
<input type="submit" value="PayPal">
</form>
I am not sure if thats what you want since I really did not understand the question
-
rahul.pache
- Forum Newbie
- Posts: 9
- Joined: Thu Apr 10, 2008 4:07 am
Re: Paypal Automation !!!!
yacahuma wrote:paypal already has a cart. You dont want to use theirs?
If you already have a cart. You can use php to loop through your cart and create the cart for paypal
Code: Select all
foreach($mycart as $obj) { $paypalCart.= "<input type=\"hidden\" name=\"item_name_{$i}\" value=\"$obj->product_name\">\n" ."<input type=\"hidden\" name=\"amount_{$i}\" value=\"{$amount}\">\n" ."<input type=\"hidden\" name=\"quantity_{$i}\" value=\"{$obj->basket_quantity}\">\n" ."<input type=\"hidden\" name=\"on0_{$i}\" value=\"product_id\">\n" ."<input type=\"hidden\" name=\"os0_{$i}\" value=\"{$obj->product_id}\">\n"; }
Thanx Dude this code that you have given is exteremely usefull for me....
Thanx a lot. !!!
then
Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> put other paypal html vars here <?=$paypalCart?> <input type="submit" value="PayPal"> </form>
I am not sure if thats what you want since I really did not understand the question