I am looking for a PHP code sample for how to send money with PayPal via the friends and family method. Anyone have a good example?
There is no code or API interface for Send Money. For general use, you can redirect a user to https://www.paypal.com/myaccount/transfer/homepage
If you have a specific recipient in mind, that recipient can create a https://www.paypal.me link
Related
I am working with the PayPal Node.js SDK and I am trying to payout a user. In order to do that I can use either their email, phone number or encrypted PayPal ID. We would prefer to work with encrypted data as much as possible. Where would we find a users paypal_ID?
If any of our code would help us find this information, we can post it just tell us what you need. Thanks in advance to all.
It should be displayed in the account overview page or in the profile. It typically shows your PayPal account email and merchant account ID.
It can also be obtained via the GetPalDetails API, but that's not REST. I'm not sure if REST has an equivalent API yet or not.
Does paypal support any sort of variable transaction? where the receiver of payment is a variable?
for example, paypal.com/pay/?to=user1#site.com&amount=10.00
All of the merchant tools use an internal paypal user id instead of a plain email, which is fair enough as they are merchant tools.
I've been reading up on adaptive-payments but I don't have any need for a middle man, just a simple payn amounttox address.
Sure thing. Like this:
https://paypal.com/xclick?business=user#site.com&amount=10
... which is just a simplified GET version of the (non-encrypted) PayPal button interface POST. Pretty much all the same parameters that you can put in the POST can be used in the GET.
I'm writing a basic ecommerce website and the only payment mean is Paypal.
Users don't have to register however, they will be mailed their product.
As far as I know you to be registered to use Paypal, and therefore Paypal stores your personnal informations (Address, names, etc..)
So my question is do I need to ask to users to enter their personnal informations while it is available on Paypal, and I guess, hope, there is an API to retrieve them.
Thank you
You have to ask for their e-mail addresses where they want the product delivered, as it do not neccesarily matches the one they used on PayPal. You will get an invoice in e-mail form PayPal for accounting purposes that sould do.
If you need customer details, you should look into the Instant Payment Notification feature of PayPal, you basically give a URL on your site, then PayPal POST-s all the details to that script. This way you can be sure that the customer actually payed for the services.
There is an extra setep involved, to verify the details you got in your IPN script as anyone who knows its URL can post anything to your script. Also a good idea to put your it into a random directory like dsf6dfsjj345432f8dsfj5j243826d and publish no liks to it, to minimze the possibility of someone trying to play around with your script.
If I understand your question correctly, you do not need to store a client's details on your end. Paypal just requires pricing, product and an invoice reference. They manage storing and securing customer CC details (for example). You might consider storing some client details (such as email, name, address and so on.... but not CC details).
Paypal will often post back order details, which do include client details (i.e. email, contact, shipping details and so on). I, however, am not entirely sure that they supply an API where this information can queried retrospectively.... maybe someone else can help on this on.
HTH and good luck
Look into their Express Checkout approach. That is designed for "preparing" a transaction which you later on finalize from your end, after you have received the customers shipping address. What you decide to do with that is up to you.
There is a request money by email feature on paypal - (where you can put email of some person and he can send you money)
Does it have an API ? (So I want to request money by email from my application)
So the answer is - no such API
It looks like you can send invoices (request money) by email with the Invoicing Service API
You can create your own personal PayPal.Me/name link (it's open to both personal and business use) and it will be associated with your PayPal account.
Whenever you need to collect money from anyone, just send them your PayPal.Me link via email (or chat, SMS...).
Your payer clicks the link, enters the amount, and that's it. The money is in your PayPal account in seconds (you'll pay the standard PayPal fee for a business account).
To request a specific amount just add it to the end of your link. For example, use
PayPal.Me/name/25
to request 25 USD. You can request a specific currency by adding the currency code to the amount, e.g.
PayPal.Me/name/25EUR
IT has that facility. you have to generate url. its mentioned at
https://www.x.com/developers/community/blogs/ppmtschad/creating-hyperlink-instead-paypal-button
First method is to use the Invoice API to generate the request and have paypal send out the email.
See https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Merchant/bizui/IntegrationDirect-outside
Second method is to use the buy now buttons. First create the product in the paypal account, then create a buy now button for it. It'll give an option for Email. You can then send that link out whenever you want.
See https://www.x.com/developers/community/blogs/ppmtschad/creating-hyperlink-instead-paypal-button and
Third option is the rarely advertised custom cart URL. I don't have anything that details this however the following sample link can get you started.
https://secure.paypal.com/xclick/business=EMAIL%40DOMAIN.COM&item_name=Cart_Invoice_Custom_Name&amount=123.45&return=www.yourwebsite.com¤cy_code=EUR
Remember to properly URL encode things. All the variables for dynamic buttons that I've tried work fine. Details of those are at https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside
It's not a problem but i don't know how to do this; let's say that I have a sign up form with some fields: username, password, email, as you know the user clicks on the BUY BUTTON and pay's up.
Well, how can I know the username that just made the payment, I mean how can I link those two things together, one idea it's to use the email address, but mose of the people sign up with different email addresses, mabe they have a different paypal address...you know...I need this information because I need a way to activate the account.
And I also need to know, if the user canceled a subscription will paypal post a message to my IPN link?
I suggest you use the following PHP script for easy integration with PayPal's service (assuming you're using PHP): http://www.micahcarrick.com/04-19-2005/php-paypal-ipn-integration-class.html
If you do, the e-mail you will be looking for will be supplied in
$paypal->ipn_data['payer_email']
(again, assuming that $paypal is your object of the paypal_class class)
Obviously you have to follow the setup steps first. I suggest using the example script. It is really easy to do - in only four steps.
I suggest you read the official paypal documentation about IPN and recurring payments.
PayPal issues a IPN for every event that occurs to the user subscription, for example:
subscr_signup
subscr_eot
subscr_cancel
subscr_failed
About the parameter, you can use a parameter named "custom" to pass a value, for example the user id or email, and that parameter will be sent you in every IPN.
Here are implementations of the PayPal IPN in both C# and VB:
http://www.xdevsoftware.com/PPIPNDesc.aspx
Here's an account of how I incorporated it into a PayPal subscriptions scenario:
http://www.codersbarn.com/post/2008/07/10/ASPNET-PayPal-Subscriptions-IPN.aspx