Send money to any PayPal account and receive payment notification - php

We are developing a website where people can use our tools to fundraise for their organization or cause. I was wondering if with paypal IPN I can send money directly to the person's PayPal account doing the fundraising.
For example. User John Doe signs up on our website Website.com. As part of the signup process John Doe enters his PayPal email address he accepts payments with.
He now has the page Website.com/JohnDoe to accept payments/donations from.
Using IPN & PayPal payments pro can I have the payment sent to his account directly and still have our IPN address (Example: Website.com/ipn) receive the payment notification and payment information?
Also does Paypal Payments pro work inside of IFrames. Let's say John Doe embeds his Website.com/JohnDoe into his own website JohnDoe.com. Or the other option is in a Facebook page custom tab.
If PayPal payments pro, or standard will not work for this will Adaptive Payments work? In adaptive payments does each person I'm sending money to have to signup for it?
Thank you!

Yes, collecting payments to various email addresses/accounts is very easy, and you can have a single IPN service to verify these transactions. See the docs at:
https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/
.... for how to set the IPN address per-transaction (overriding any setting your merchants may be using account-wide for other transactions.
iFrames are a problem; PayPal has historically not allowed this for security reasons; they didn't want the potential for snooping js in other frames on the page. However as the web frameworks for this have matured PayPal has opened up some in-page checkout options (e.g. lightbox checkouts). You should check the latest docs (or ask someone # PayPal) which, if any, integration models/checkout experiences currently support running inside iFrames.
Adaptive payments is not very likely to be the product you want; you will want either an PayPal Pro/Express Checkout solution or something packaged in the newest Braintree SDKs.
And finally: yes, with a few exceptions that probably don't apply to your use case, PayPal pays out only to PayPal accounts. Thus every business or person would need to sign up for a PayPal account in which to receive PayPal payments. (Note that in some cases users can sign up after the payments arrive... payments to an unsubscribed email address will be held and that email address notified of the pending payment and asked to sign up & complete the transaction(s).)

Using IPN, it's possible to set the recipient's address and the notification_url dynamically (see https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/). So using this method it ought to be possible for a payment to 'John Doe' to be made at your site, and for the payment to be sent to 'John Doe', and for the IPN notification from Paypal to post to a listener script at a URL at your site.

Related

Perform a PayPal payment automatically using PHP

How can I automate a PayPal payment using PHP?
I have the email of my PayPal business account, the PayPal email of the receiver and the amount to transfer.
Is there a way to make the money transfer without my interaction? (the payment originates from my account)
Of course I'll run the PHP script manually
I'm going to answer my own question:
It's possible to make a PayPal payment using PHP only, it's called Implicit approval payments
Implicit approval payments are payments where the sender and the API caller are using the same account. Because PayPal draws the funds for the payment from your own account, there is no approval necessary, and as such there is no visible flow for implicit approval payments.
I tried using the Pay API and the payment is made within the PHP script, no need for a web flow or any other manual approvement.
The Pay API requires an extra field, called senderEmail, set this field to the PayPal email user account

PayPal payment with credit cards

I have a problem with integration of paypal payment. I want to make it so that customers can't register to paypal, but paypal only shows the register to paypal.
I use php library. Is it possible that they add only credit card without registration?
If you're using Payments Standard, Express Checkout, Adaptive Payments, or anything that actually redirects the user over to PayPal then it would be done with "guest checkout", which is an option on that checkout screen. In order to make that work you would need to make sure the PayPal Account Optional setting is enabled in your PayPal profile.
If you go with Payments Advanced you would imbed an iframe in your site that PayPal actually hosts, and it would have the PayPal option as well as credit card option built in to that.
Payments Pro would give you full freedom to process credit cards directly via API request, and then you wouldn't have to display any PayPal logos or show that PayPal was involved at all in that case.
I would still recommend leaving PayPal as an option for people, though.
My site is actually is a good example. Notice if you add that item to the cart you'll see the option to "Pay with a Credit Card" or "Pay with PayPal". If you choose credit card that would move to a credit card form and would be processed through Payments Pro (PayFlow). If you choose PayPal it would go through Express Checkout. So you still give people both options, but it's very straight forward for non-PayPal users.
You can send money to anyone with an email address but in order to claim the funds they would have to open a PayPal account. What happens is that you send the money to their email address, they get an email letting them know they have received funds. They are then instructed to follow the directions to open an account to receive the funds into their PayPal balance. It is a very straightforward process and a new account can be set up very quickly. Thanks for your great question and I hope you have a great day.

IPN feedback for 2 people

I have a page on my site which sends out payments to more than 1 person. I've been testing this using the paypal sandbox account with a few test accounts.
I am also using ipn to get feedback from paypal when payments are complete, pending etc.
My question is, paypal sends me back info via ipn for just 1 of the payments. Why is that? When I check the payment amount in the ipn, it only shows me the payment for 1 of the people who got paid. For example:
If I pay person 1 and 2, where each person gets paid $10 each, so a total of $20. The ipn page only shows me the details for person 1 and says that the payment amount was $10, when the total payment amount is $20.
This is causing me a problem because I need to know that both payments were successful via ipn. At the moment I can only check the payment for 1 person at a time, even though I am paying 2 people at the same time.
How do I get payment for both people?
#Pete answer is a violation of the Paypal User Agreement (unless you have a separate legal entity for both accounts)
9. Restricted Activities
9.1 Restricted Activities. In connection with your use of our website, your Account, or the Services, or in the course of your interactions with PayPal, a User or a third party, you will not:
a. Breach this Agreement (including, without limitation, opening multiple PayPal accounts or breaching the Card Processing Agreement, the Acceptable Use Policy or any other agreement that you have entered into with PayPal (including a Policy));
What you are looking for is PayPal Adaptive Payments. A note about this though: one account - probably you as the application owner - must have a PayPal business account. The others that receive a payment only need a personal account.
PayPal provides an SDK with samples for the Adaptive Payments on Github. Select Adaptive Payments from the menu on the left. There are samples for multiple languages that should be able to get you started.
My hunch is that IPN is tied to the individual account, not the payment, and you have the IPN set up from just one of the accounts. I think what you need to do is configure the IPN on both accounts and then process the response from PayPal two times... once from the IPN notification of the first account, and once from the IPN notification of the second account.

how i come to know if cancel subscription from Paypal site

I have integrated PayPal merchant account to the website , m doing it for a client
People can sign up to the website after subscribing and hence paying thru PayPal .we have recurring payments. But if people unsubscribe from the site their access to the site is closed but my issue is if people don't click the unsubscribe on the site but just cancel the recurring payment from their own PayPal accounts how would I cancel their subscription on the site.
Please suggest some PHP code or idea to cancel the subscription.
Thanks in Advance, vikas tyagi
i got it a perfect solution of my question
In addition to email notification, PayPal can send you the transaction data (also called Instant Payment Notification) to a specific url. With Instant Payment Notification, PayPal sends payment notification messages with encrypted code to the specified URL for each payment you receive. Follow the instructions below to setup Instant Payment Notification.
Go to the PayPal website and log in to your account.
Click "Profile" at the top of the page.
Click "Instant Payment Notification Preferences" in the Selling Preferences column.
Click "Edit IPN Settings."
Enter the notification URL and select "Receive IPN messages."
Click "Save."
You can send customized emails from the Instant Payment Notification data. Please see http://paypaltech.com/SG2 for sample scripts.
we can customize sample script code according our need.
Add the logic to your Paypal IPN handler, Paypal should send a notification to your server via IPN with that information.
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECRecurringPayments
Another idea could be queryiing paypal API and see if the subsscription is still active when the user logs in.
But im sure IPN handler is easier to implement

How do I create an adaptive paypal payment without autorization?

I am using the adaptive paypal payment console here: https://apigee.com/console/paypal to make payments to people. I can't find a way to send money out to individuals without granting them permission (from me). I want to be able to send out payments to people automatically when they request it. How would I do this?
You mean you would be the sole 'sender', sending money to different PayPal recipients?
Simply use the MassPay API. This is not part of Adaptive Payments but rather the normal PayPal API's.
If you use Sandbox, you can request for MassPay to be enabled on your Sandbox account by filing a ticket with PayPal Merchant Technical Services at https://www.paypal.com/ or starting a thread in the appropriate forum at https://www.x.com/ (PayPal's developer community).
If you use the Live PayPal site, you can call / email PayPal Customer Service to get it enabled on your Live account.
For the API documentation, see https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_MassPay

Categories