@sidhx
Then you picked the wrong thing to attempt. This sort of thing is not something you just copy/paste of a public forum.
The simplest method that does what you are asking
(that I know of, at least) is in that link I posted.
All you are required to do is construct a HTML form from your shopping cart data. You don't have to mess around with any sort of API, or any complex PHP back-end stuff; it's just creating a bit of HTML. - Read through the PayPal documentation I linked. It explains everything you are required to do.