Paypal integration confusion - php

I'm designing a database system, which sells courses to students. This is all done within PHP. I want to take Paypal payments on my website and having done some research I need IPN.
I've been reading docs/guides on how to achieve this from www.x.com but its quite confusing to find info I need as there seems to be more than one way of doing something. The IPN stuff looks pretty straight forward, paypal just needs the unique Invoice number, which the notify script uses to retrieve the record and post the appropriate response into a database and if all goes well, redirect page to a thank you.
The thing is which method do I initially send my values across to Paypal, I don't really want to pass on quantity and shipping data as all of these pieces of data are irrelevant I don't want my end user to see. Do I have to start looking at using the paypal api?
Thanks for the advice

Since your question seems to be "where should i start looking for a good paypal integration with php" i'll give you some general "advice". I had the same problem just a couple of months ago.
Yes you've to read paypal docs, and unfortunatly they don't have the gift of clarity.. very complete but i didn't find them very clear.
However this php class has been very helpful for my similar project: https://github.com/Quixotix/PHP-PayPal-IPN hope can help you too.
Also these articles/classes/docs has been helpful (but at the end i'm not using them) to clear my mind about PP integration:
http://drewjoh.com/wiki/code/classes/phppaypal
http://www.geekality.net/2011/05/28/php-tutorial-paypal-instant-payment-notification-ipn/

set up a sandbox account https://developer.paypal.com/
then go through some of the tutorials
you will also need to set up some test accounts, pay attention to the nav on the left (from the developers page). It has everything you need

Related

Paypal express checkout - buyer details

so I need to ask a question, I need to setup a simple paypal express checkout system, that one can allow users to change currencies, and two can then update the page with the updated currencies.
Then I need a way for me to get the order information. As I will be selling website templates so I need a way for me to get their email address, so I can then email them with the link to the template file download.
So my question is what data do I get if I set up an express checkout system. And what code do I need, Do i need to create a database to get the returned data back from paypal? Or do I just get an email or can i see that when i log into my paypal account and check orders and see their details that way, but the main important detail i need is their email address?
Can I also say that this is the first time I have looked into express shopping carts. So I am a complete novice in this field, So I will struggle with the coding aspect. But I think it is the route I need to go down.
Also I want to make it all in php as well. But also I don't want to use ready made systems. I just need the back-end code so that I can then just implement it into my current design. Not sure if paypal give you the code when you click the express shopping cart option in All tool section. I did notice though it redirects to a page that lists many partner sites. I couldn't find anywhere for any implementation advice or tips or code.
EDIT: Also I know I will also need to use either IPN or PDT but the documentation I read is highly confusing and just is making me unsure if I can even set a system up. I also read that you should implement both systems, but I also read that that had a risk of doing the payment twice. So yeah i am kinda a bit unsure how to even go about implementing a system I need.
Thanks in advance.

Updating Customer Credit Card with PHP & Stripe

I am trying to add this script to my Wordpress website that I found on Stripes documentation but I am a little confused as to how to enhance it more to know when the user already has a card on file it needs to update it rather than creating that customer again.
The code I was originally using can be seen here:
https://gist.github.com/bateller/154c6e5d1f6e0e53e527
This is that code with my edits to try and make it update:
http://pastebin.com/B3LXZpWq
I can't find any information anywhere that seems to make sense to me. Hopefully someone can break it down and help me understand before I loose my mind.
Take a look at Managed Accounts
Stripe - Managed Accounts - https://stripe.com/docs/connect/managed-accounts
You get a greater freedom when it comes to things like updating details and it is also a little stricter but worth it for the added API features.

Paypal IPN to update 'units sold' on website

Sorry for the very basic nature of the question, but I've been searching for two days and I'm still not sure how to do this.
I've got a paypal cart/store set up. How do I leverage either paypal IPN or a third party service to identify one specific item of the three items I have for sale, and send me a notification that a copy has been purchased, and then update a counter on my original website?
Again, just suggestions or a guideline would be greatly appreciated - even to point me in the right direction. Thank you.
A basic guideline for you:
have a sandbox account (I assume you already do)
create there a seller and buyer account
set IPN setting for seller account to your testing URL (where you will be checking for certain data returned)
for the URL mentioned above create a php file with IPN validator
and go here https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables#id08CTB0S055Z to check variables you will be searching for.
I assume you would need to pick num_cart_items and loop throug possible item_nameX variables returned.
You don't need to code anything to validate IPN, use some of these classes:
http://www.micahcarrick.com/php-paypal-ipn-integration-class.html
http://www.phpclasses.org/package/2249-PHP-Process-Paypal-payment-interactions.html

integrating Paypal into a website - is this possible?

I'm a bit of a newb and have never integrated paypal into a website before so I apologise for my lack of knowledge.
I'm trying to build a website which allows users to sign up and, assuming they get themselves paypal premier accounts (so they can receive payments by credit card) they will be able to receive payments from other users of my site.
So someone will sign up using their Paypal email address, and other users will then be able to send them money through my site. If they use one of my special services then I also want to be able to take a 1% fee of the money sent.
I'm using cakephp and I've searched and found a few cakephp related paypal components but to me it seems that these are aimed at people who want to just use their own paypal account to receive money. Like having a paypal checkout button. Whereas I want to be able to direct money into many different paypal accounts. Is this possible? And if so can any kind soul direct me to where I should be reading (pref something not too difficult - I'm a learner!).
Also as a side note, are there any special security issues I need to take care of when dealing with paypal, especially considering the particular nature of what I want to achieve? How easy would it be for a bad person to alter someones paypal email to direct funds to themselves?
many thanks in advance
Dave
A few years ago I did a similar thing, although the specific code is languishing on an old computer somewhere... Anyway, the way I did it was to use a combination of IPN and Paypal Mass Payments. Any payments have to run through your own PP account first and foremost, at which point on a successful payment IPN calls a script to run Mass Payments and send the money to the intended target(s).
It's a bit fiddly, and I seem to remember (at least when I did it) there were some odd bugs in IPN, but this should do it for you.
HOpe this helps a bit!

PHP PayPal Subscriptions

I'm looking for any way of using the PayPal IPN to create subscriptions and update my Databases.
I know it's a bit of a vague question but any script/class that will create a subscription and allow me to do anything automated on payment would be great.
I've been playing around with the PayPal IPN for a while now but can't seem to get anything to work for subscriptions.
Any help would be really appreciated.
Thanks!
IPN is only used for notifications, not to issue commands. You need to either look into their SOAP API or their NVP API.
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_NVPAPIOverview
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_PayPalSOAPAPIArchitecture
You might want to look through their forum for examples like this (there is probably tons of other premade classes/scripts):
https://www.x.com/thread/36523

Categories