PHP PayPal Subscriptions - php

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

Related

Paypal API List Withdraws

I'm implementing a PHP Web application that uses PayPal for payments. I'm using for all the things the REST API.
My problem is how can I get the list of withdraws from PayPal API?
I'm going to use the functionality to withdraw to a bank every day, but I will need to see, with the API, those withdraws...
Any idea? I'm a little bit lost after spending two days searching and trying page on google.
Thank you in advance,
Rui
I don't think the REST API supports it yet. The Classic API does, though, with the TransactionSearch API.
Our PayPal PHP SDK will make this very quick and easy for you to setup.

PayPal DoAuthorization, DoCapture and DoVoid

I am creating a website for auctions using Paypal. Clients pay a small fee to participate,
and when the offer falls on someone, the others recover their money.
How do I implement DoAuthorization, DoCapture and DoVoid (NVP) methods in php? I didn't find any tutorial for this case.
Did you take a look at the code samples here? There are PHP samples for all 3 of these on this page, for both DoDirectPayment and the Express Checkout API's. The SDK's are also very useful as they have all of the code samples as well for PHP. Between the samples and the SDK's, these will give you a working example, something to build off of.

Paypal integration confusion

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

paypal integration in php

First time I am starting to implement the paypal integration. Please tell me how to write code for a payment gateway(paypal) in php and it will be better if you will show a good demo from where I can get some ideas.
There are several sources on the net where you can find detailed information regarding paypal integration (with php). Here is one to be named:
Paypal

Using Paypal Adaptive Payments API like Kickstarter uses Amazon Payments?

I'm wondering if it's possible to use Paypal Adaptive Payments in the way that Kickstarter.com are using Amazon Payments to collect/fundraise.
For example: A user sets up a project. People pledge $5 to that project, and if it meets a goal, the system then automatically extracts the money from everyone, and puts it into user who created the projects paypal account. Is this possible using Paypal?
Are there any good PHP libraries supporting Adaptive Payments, if this is possible?
I was also looking for the same answer since I am working on a similar crowdfunding platform as Kickstarter is, but I need to use PayPal.
After a lot of Googling and reading about PayPal's Adaptive Payments API I found out that it's possible by using the Preapproval API and then if the project is funded I can use Chained Payments to send the money to the project creator and to also retain a small fee (a percentage) for using the crowdfunding platform.
If you are looking for some PHP libraries you can found 2 versions at the links below.
One is a library for the CodeIgniter framework and the other one is a PHP API class that can be used anywhere. So, here are the links:
CodeIgniter Library - http://www.binpress.com/app/paypal-adaptive-payments-pro-codeigniter-library/140
PHP API Class - http://www.binpress.com/app/php-paypal-pro-adaptive-api-class/612
I see now that your question is 2 years old, I just hope this answer helps others looking for answers regarding PayPal's Adaptive Payments API.
Yes, it is possible using the Adaptive Payments Preapproval API. When someone 'pledges' would be when you set up the preapproval, and then you can run that preapproved transaction at some future time without any additional interaction required.
PayPal has developed a PHP SDK with libraries and examples to get you started.
If you're going to use PayPal, there's a good Ruby gem: adaptivepayments-sdk-ruby
This answer is a couple of years late but better late than never! The one downside to using the Adaptive Payments Preapproval API for a Kickstarter type of system is that you can't guarantee the "pledge" will be valid when you go to make the withdrawal, since it is possible for the user to cancel their pledge at any time.
I've been working on a crowdfunding project similar to kickstarter. I started out using paypal's adaptive payments for this kind of thing but I eventually switched to wepay's preapproval api. I'm glad I did. For one thing, their documentation is clearer and better organized with good examples in PHP, Ruby and Python.

Categories