CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Paypal, Posting Multiple Items, Parameters

Print topic Send  topic

Author Message
pvanleeu

Posts: 5
Posted: 09/03/2008, 1:21 PM

Hello,
I was trying as hard as I could to find a solution to this problem.

Description:
To submit multiple items to a paypal account you need to pass multiple parameters (item_1=this, item_2=that, etc). For a single item you would just create static hidden inputs then have them post to the paypal website.

Problem:
I do not know how many items I will be posting to paypal (determined really by how many items are in the cart). Also I need to have the hidden fields created inside the form that will post to the ebay website.

I was thinking about just posting all the finalized information to a dummy site that builds up a massive $redirect, but I was hoping there was a better way.
View profile  Send private message
DonP
Posted: 09/03/2008, 1:31 PM

What I did was to use PayPal's shopping cart, then it will take care of
multiple items for you. However, my new cart, which is under
development, saves each item in an order to a table in my database, then
submits it all at once to PayPal as a single order rather than as a
listing of separate items so there is no need to send multiple items. I
do not believe PayPal can handle them even if you were to do so. If you
are hosting your own cart, then sending a single order is the way to do.

Don (DonP)

pvanleeu wrote:
> Hello,
> I was trying as hard as I could to find a solution to this problem.
>
> Description:
> To submit multiple items to a paypal account you need to pass multiple
> parameters (item_1=this, item_2=that, etc). For a single item you would just
> create static hidden inputs then have them post to the paypal website.
>
> Problem:
> I do not know how many items I will be posting to paypal (determined really by
> how many items are in the cart). Also I need to have the hidden fields created
> inside the form that will post to the ebay website.
>
> I was thinking about just posting all the finalized information to a dummy site
> that builds up a massive $redirect, but I was hoping there was a better way.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
pvanleeu

Posts: 5
Posted: 09/03/2008, 5:20 PM

Hmmm..
We have also developed our own shopping cart system which is why I have so many items to POST to paypal at once.

Are there any other options that you know of besides sending one full order? Does it make sense to not just have one full order?
View profile  Send private message
DonP
Posted: 09/03/2008, 6:36 PM

Posting a single order is the only way as far as I know. In fact, I
can't imagine why you would even want to submit multiple items if you
have your own cart as it seems to defeat the purpose. Getting the
payment is the goal and, with a single order submission, you can
calculate shipping and that sort of thing before submitting where PayPal
cannot.

On my cart which was created mostly in CCS v3.2 (the cart itself is a
plug-in), it posts the order along with the order number that, once
paid, sends it back to my site and even takes the items out of inventory
and I can view the items in the order using the same order number by
simply pulling them out of the table. The order can contain as many
items as needed but only one payment from PayPal is required to pay for
it all.

Don (DonP)

pvanleeu wrote:
> Hmmm..
> We have also developed our own shopping cart system which is why I have so many
> items to POST to paypal at once.
>
> Are there any other options that you know of besides sending one full order?
> Does it make sense to not just have one full order?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
mentecky

Posts: 321
Posted: 09/04/2008, 6:13 PM

I did this a while ago with an older version of CCS... It's probably overkill but you can steal what you need.

#1 this code has NO freaking warranty! I was a newbie when I wrote it!

#2 There is an access DB and in the /SQL folder there is a DB creation script. The SQL is the most up to date. Not sure if the access one will even work.

#3 I wrote this a few years ago so I'm not sure it's 100% going to work with PayPal, but the customer still seams to be using it.

#4 and MOST important! I hard coded some URLS. Do a FIND on files and look for "xxxx" You need to put your URL in there.

OK The all important URL...

http://www.ccselite.com/samples/cartpal.zip

It's a little dated but the code is solid. You'll have to mess with it.

I hope that helps!

Rick


_________________
http://www.ccselite.com
View profile  Send private message
mentecky

Posts: 321
Posted: 09/04/2008, 6:21 PM

PS... this does implement the 2-way interface to PayPal
_________________
http://www.ccselite.com
View profile  Send private message
mentecky

Posts: 321
Posted: 09/04/2008, 6:22 PM

PPS... if you see any swear words in the comments I was having a bad PayPal day. O:)
_________________
http://www.ccselite.com
View profile  Send private message
wkempees


Posts: 1679
Posted: 09/05/2008, 2:00 PM

Hmmm,
My 2 cts, why not have a look at the CodeChargeTools Paypal Shop builder.........

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
chriscripps

Posts: 30
Posted: 09/05/2008, 3:59 PM

Walter,
I like the CodeChargeTools Paypal Shop builder, it seems very easy and looks great since everything matches the Code Charge style. One question though, how would I allow a client to be able to tell me the check is in the mail instead of pay for it with paypal (or if they wish, pay with Paypal)?
Thanks,
Chris
View profile  Send private message
wkempees


Posts: 1679
Posted: 09/05/2008, 4:26 PM

Good question.
Needs either some study on my part (thanks) or a direct answer from Frank.
Frank, help me out here! (mail send)

Might be a optional button or so.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
pvanleeu

Posts: 5
Posted: 09/09/2008, 9:22 AM

I ended up just doing a single amount since I built my own cart. It was really a simple to implement. As for having a customer notify you that a the cheque is in the mail you could always
a) have an order status feild in the table that you check frequently to see which items are still needing payment
b) use the php mail function to send yourself a mail that a particular user is sending the funds via cheque.
View profile  Send private message
mentecky

Posts: 321
Posted: 09/09/2008, 5:45 PM

The code I posted above implements PayPal's IPA... which will tell you when orders are actually paid for. The page "cp_notify" does all the DB work when paypal sends you an update to the payment.

Rick
_________________
http://www.ccselite.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.