Page 1 of 1

How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Fri Mar 20, 2015 6:30 pm
by simonmlewis
We use external web sites for the cart processes. It works well for us, as it takes away the next for us to supply all the accounting information stuff.

But, it would be rather good if we could do it ourselves. I know how to do Carts, specially if done with a database and logins, but once items are in a cart, I see templates such as woocommerce, where you select PayPal for example, and process, and it takes the user to PayPal and it shows the products being bought.

Of they go thru ePDQ or other methods.

I don't understand tho how these methods work. Does each method require a very different style of processing code?
ie. PayPal: how does it pass thru each of the products, if you have not setup product codes for those items. For example, we setup a web site with a WP theme, made up two products randomly, and took them to PayPal and they they are in the PayPal screen.

This clearly isn't done with any form of PayPal created button as I didn't enter paypal to do this - until I reached that page.

How does it do it?

I'm sure if I can work that out, I can do the rest, such as local stock controls, addresses etc.

I've also seen where these payments are taken directly on the web site itself, not going to PayPal to login and pay. Is there a special way that is done?

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Sat Mar 21, 2015 11:33 pm
by requinix
Itemized carts are done by passing all the information to PayPal directly. You don't set up anything about items, you just tell them, essentially, an arbitrary number of item descriptions with prices.

Take a look through their API. It's all fairly well documented.

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Sun Mar 22, 2015 3:37 am
by simonmlewis
Where?

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Sun Mar 22, 2015 5:21 pm
by requinix

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Sun Mar 22, 2015 5:42 pm
by simonmlewis
That's a list of search results. Is there not a comprehensile todo list on how to do it?
It cannot be THAT complicated.... Can it?

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Sun Mar 22, 2015 11:08 pm
by requinix
I'm sorry, I didn't know you needed a comprehensive list of what you're supposed to do. You should find a place where you can describe the exact details of your application, upload all your source code so somebody can learn it, and tell you exactly what you need to do. You know, everything up to the point where you actually do it.

Perhaps you noticed that the first result was to PayPal's API? Did you consider looking there? Learn the API, which includes examples last I knew, and implement it. You're going to have to, you know, learn here.

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Mon Mar 23, 2015 4:00 am
by simonmlewis
I kinda assumed there was a bible saying what code was needed to make things work, how to collate the data from local variables, store them into a button or session, and pass that over. I thought there might be a place where all this is listed and taught, rather than a scattered amount of pages all over the place.

I know there will be different sources on various preferred ways, but there is surely a bible of "the" way? Or is that the API PayPal i should be looking at?

As I say, it can be done via WP plugins, but I want to do it myself, so I have my own code, and can just plug that into a web site.

Re: How do you process Carts thru PayPal and ePDQ on PHP?

Posted: Tue Mar 24, 2015 2:09 pm
by simonmlewis
requinix wrote:I'm sorry, I didn't know you needed a comprehensive list of what you're supposed to do. You should find a place where you can describe the exact details of your application, upload all your source code so somebody can learn it, and tell you exactly what you need to do. You know, everything up to the point where you actually do it.

Perhaps you noticed that the first result was to PayPal's API? Did you consider looking there? Learn the API, which includes examples last I knew, and implement it. You're going to have to, you know, learn here.
I've had my API credentials created, and got to https://developer.paypal.com/docs/class ... scheckout/, but I don't know if i am in the right place. I don't see anything here about the files needed, where code goes, how you collate the cart into a form - that sort of stuff.

Maybe in PayPal that's where it starts.....
I'm having an ePDQ account setup for the other purpose of this.