PayPal sandbox email notifications - php

I'm testing PayPal as a payment method for my website in sandbox mode. My requirement is, an email must be send to the merchant after each transaction. I am using the PHP SDK. How is this possible?
This is the configuration that I have seen for notifications in paypal.

PayPal already sends its own emails to the merchants after each transaction completes. In sandbox, you can see the notification methods in the "Notifications" tab of https://developer.paypal.com
If you want to generate your own emails in addition to the PayPal emails, you should use a server-side integration. Here is the front-end UI: https://developer.paypal.com/demo/checkout/#/pattern/server
You'll need two corresponding routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/
That last route of yours can send your email on success.

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 API Pay Email Address Directly?

One of the features on my site allows users to pay via PayPal for items from other users. I'm using the standard REST API since I had already made the code for another project a while ago, which works fine.
https://developer.paypal.com/docs/api/#create-a-payment
Currently, the page sends a 'v1/payments/payment' request which I execute to receive the money in to my PayPal account which created the access token. Is there a way I can directly get the user to pay another PayPal email address?
If not, I guess the only way is to do another request to pay the owner of the content from my PayPal once I receive the money - although it means PayPal get to charge a fee twice.
Thanks.

Send money to any PayPal account and receive payment notification

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.

I keep receive error on paypal php adaptive payment API payment "Your payment can't be completed..."

I try sample files inside latest php API for adaptive payment (1.96) and creating a primary pay. then did pay with my sandbox account and every things working fine. I use the same process and integrate API with my php application.I'm able to create primary payment and get payKey. I use payKey and do payment. I login with my sandbox personal account and click pay then see this problem:Your payment can't be completed. Please return to the participating website and try again.
Note: I did not change any config.ini information.I create multiple pre-confiq accounts in my developer and put them as sender or receiver through sample and application test.both API sample and application environment are virtual hosted on my local machine.this is paymentDetail object info
I found problem.
I was resetting test account and creating new test emails that noted on one suggested solution and forgot to replace new email in my integrated application.
by the way replacing new email solved my problem.

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