If when you click the “Submit Payment” or whatever you called it button on your html form you then get taken to the Paypal site and if you can see there the contents of the shopping cart with the correct payment amounts then that is a very good start. From there the shopper has the choice to use their paypal account or their credit card to make the actual payment.
I’m sure I’ve done this. I’d be happy to PM you a link to my test page.
It’s a really basic system we’re doing.
I mean it’s just adding ‘Add to Cart’ buttons to certain WordPress pages.
I remember reading about IPN in the past as this was something we were looking at for another client. Right now, I’m not sure how necessary it is however.
I think right now I’m good to go as I don’t need IPN to change my database.
Can’t thank you enough for your help here Kalon. Very patient and helpful in your replies. Many thanks
invision2, just in follow up to my earlier statement, PayPal alike with shipping do (somewhere in their API) have a similar feature for calculating sales tax (as it differs wildly between countries - and even states in the USA). So as you’re looking for the variables for hooking up the delivery cost you might be able to get PayPal to factor in the tax variable as well. In regards to where the stuff is located, there should be something in PayPal’s array of help files to point you in the direction.
As long as the shopper can see the contents of their cart and the correct total for payment when they are taken to the Paypal site from your site, it should be ok.
I would suggest rtfm (Read The Fine Manual) first, especially if you haven’t integrated Paypal into a website before. The link I posted earlier takes you to their web page where you can download the appropriate pdf manuals.
Then create a Paypal Sandbox account for testing your application. Then start coding up your Paypal integration.
We’re hoping to use WordPress for the entire site so we’ll probably just use PayPal’s shopping cart buttons (‘add to cart’).
Regarding shipping, I calculate it on the client’s website according to the client’s specifications and store it in a session variable as the visitor shops. I then add the value of the shipping session variable as an additional parameter in the html form that sends all the details to Paypal. The shipping cost appears as just another item in the cart called shipping as far as the Paypal and the shopper are concerned.
Can you give me an example of the kind of data stored in the shipping session variable?
Is there any harm in getting PayPal to calculate shipping costs once the client is ‘checking out’ ?
You can get all the documentation (pdf files) you will need to integrate Paypal into your website from the Paypal’s website.
You can use PP’s shopping cart and/or buttons or you can use your own shopping cart (I use my own and it works well)
Basically all you need to do is set up a html form which sends your cart’s contents plus a few other parameters to Paypal for online payment processing.
Regarding shipping, I calculate it on the client’s website according to the client’s specifications and store it in a session variable as the visitor shops. I then add the value of the shipping session variable as an additional parameter in the html form that sends all the details to Paypal. The shipping cost appears as just another item in the cart called shipping as far as the Paypal and the shopper are concerned.
the last time I looked Paypal only allows you to set one postage rate.
How I’ve got around this in the past is to make the price input a SELECT field so the user chooses their delivery country/location and sets the price including P and P accordingly.
The Sandbox is a testing environment to test your integrated online payment system without actually moving funds from any accounts.
If when you click the “Submit Payment” or whatever you called it button on your html form you then get taken to the Paypal site and if you can see there the contents of the shopping cart with the correct payment amounts then that is a very good start. From there the shopper has the choice to use their paypal account or their credit card to make the actual payment. You will need Sandbox to simulate the payment from here on.
One of the features of the Paypal system is IPN (Instant Payment Notification). If you want to use this feature you will need sandbox to test your code. Basically, IPN sends a POST to a script you have on your website after the shopper has completed their online payment. Part of the info sent in the POST is a parameter saying whether the payment was successful or not. Your script looks at the POSTed data and if the payment was completed then your script can do other processing like update your database saying the payment for that order has been completed and you can then arrange to deliver the ordered goods. Although IPN is optional to implement, if you do then you will need Sandbox to test that an IPN POST is sent to your script and that your script code runs correctly.
If you don’t use IPN then you still get the normal email from Paypal saying a payment has been made to your account, but only if the shopper didn’t change their mind and leave after they were taken to the Paypal site.
I may be getting ahead of myself a little. But I’ve added an item to my PayPal account, set up the ‘Add to Cart’ buttons on my test page and it now links straight through to PayPal.
The session variable I use for shipping costs just stores a number which is the shipping cost for the cart’s contents. The way I calculate shipping depends on the criteria provided by the client.
Not if you are sure it is calculating the shipping cost exactly as you need it to. You can test your Paypal integration with your website by using the Paypal Sandbox.