Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to paypal integration,
Requirement (paypal USA):
Admin should be able to generate paypal invoice from website admin panel. As this is service invoice and charges will be different depending on client requirement.
And User, from website client area can receive paypal invoice and pay it online.
I ve read few documents of paypal api but couldn't decide which flow/API to use.
Please suggest best way with least coding to integrate paypal with my website.
You can use the Invoicing API for that. My PHP class library for PayPal will make this very simple for you. It comes with fully functional samples and ready-made templates so you can get calls working very quickly and easily.
For example, take a look at the CreateAndSendInvoice sample. All you would need to do is replace the static values with your own static or dynamic values and it would create the invoice in the PayPal system as well as send the user an email to pay the invoice.
It also comes with all the other calls like CreateInvoice, SendInvoice, DeleteInvoice, CancelInvoice, etc, so you can easily make any call you need for a complete PayPal invoicing system.
There are two API endpoints that could serve your purpose.
Invoicing using Classic APIs, which uses SOAP, NVP and at times REST to make calls
Invoicing using New REST APIs which is the new API set that PayPal is actively developing.
The REST APIs are getting actively developed and supported, and we encourage external developers to start using REST APIs over Classic APIs, to ensure long term support from PayPal with any issues, and features. However, as these APIs, are getting developed, few specific features are still getting developed, and should be available soon. However, Invoicing APIs is developed with most features as Classic APIs.
REST APIs also comes with these APIs:
Create an invoice
Send an invoice
Update an invoice
Retrieve an invoice
Get invoices of a merchant
Search for invoices
Send an invoice reminder
Cancel an invoice
Delete an invoice
Retrieve a QR code
Record a payment
Record a refund
We are currently supporting PayPal-PHP-SDK, an SDK for making calls to PayPal REST APIs. There is a lot of documentation around the SDK from installing it, to running samples, etc.
I would definitely recommend you to download this SDK, and run the samples locally in your machine, (which generally takes few seconds to setup), and try out Invoicing Samples. You could modify the samples, to verify the specific use case that you are trying to accomplish. You could view the sample source code online here.
Please let me know if you run into any issues, and we would be more than happy to help.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I don't know where else to turn...
I have a client who insists on using PayPal as their credit card merchant. We will be taking cards directly on the site, so I suppose "Website Payments Pro" is the right avenue?
All of these different PayPal types, API's, accounts, etc. are all very confusing to me- I'm used to working with Stripe which is, in my opinion, the best, cleanest solution I have ever found.
Anyway, I have been looking everywhere for some sort of a PHP class to help me interact with the PayPal API as I have all but given up on figuring out how to interact with this thing from scratch. All of the classes I've found are several years old and no longer seem to function properly.
Does anyone have any suggestions? Any help would be extremely appreciated!
This PayPal PHP Class Library will make all of the PayPal Classic API calls very simple for you, including Payments Pro. It has fully functional samples included with it, and then "templates" that are empty and ready for you to simply fill in your param values. It handles the rest.
You can see a sample of the output for DoDirectPayment here, which is the API that is used for Website Payments Pro 3.0 that you mentioned. Note that it's working in the sandbox, and PayPal's sandbox is a little slow processing credit cards, so that sample might take a few moments to load, but the live servers don't do that.
You do need to make sure "Website Payments Pro" is what your client has enabled on their PayPal account if you're going to use DoDirectPayment, though. PayPal has a new version where they dropped the "website" and they just call it "PayPal Payments Pro 2.0". Yes, 2.0 is newer than 3.0. There's a reason for that, and if you're curious you can read about the history of PayPal Pro here.
If the client has the newer PayPal Payments Pro 2.0 enabled then you'll need to use the PayFlow API instead of DoDirectPayment. The class library includes that as well, and you can see a sample of its result here.
Using the library you could get credit card processing up-and-running within minutes.
I suggest the Omnipay Package; it's well maintained and it has a lot of gateways for different payment services. I've started using it 8 months ago: it's simple and it works very well.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm somewhat familiar with the classic Paypal API but I'm trying to figure out a few things for the REST API. I browsed around the documentation but I couldn't find anything
With the REST API, Can I set a username, password and signature of the person to transfer the funds to just like I can with the classic API, or is it based entirely on the client_id and secret?
The software I'm working with is sort of like a marketplace where there are buyers and sellers. If I cannot use the username, password and signature for the individual sellers, is there some other way to handle the payments between buyers and sellers so that the sellers don't have to sign up for developer accounts to get their own client_id and secret?
Considering that credit cards are a form of payment, I assume this means I don't have to re-direct to Paypal's site to handle this, unlike the classic API. Correct?
I saw this code sames for PHP on paypal's site, but I'm wondering if there are more in depth examples. Does anyone know of a good tutorial for the paypal REST API?
For those of you downvoting, can you please point out anywhere in the documentation that it explicity answers my questions?
The PayPal REST API uses only OAuth 2.0 for authentication, so yes you need to provide a client id and secret, and call the OAuth end point to retrieve an access token to use in subsequent calls.
Currently there is no way to do that through the REST API.
Correct, the REST API does not require a redirect for the credit card use case.
With respect to samples, there are SDKs for several different languages, that include sample applications. Is there something in particular that you are looking for?
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How does Etsy (a website collective for sellers of creative products) know the payment was made through Paypal? Is it possible with PayPal Express Checkout to use my accounts API, but send the payment to another account, purely by specifying the accounts email?
When you buy something from Etsy, the payment goes straight to the seller. It appears Etsy use PayPal Express Checkout to achieve this, using its own API details (i am assuming). As soon as the payment is made, Etsy is aware of this. It removes the item from sale and sends you a confirmation email. How does Etsy do this when the payment goes directly to another account?
As far as i can tell, PayPal will only send the payment to the account for which the API is linked to. When you make the first call to setup the Express Checkout with Paypal, is there a way to pass through the email address of the account you actually want the payment to go to during this process? I cannot seem to find this field anywhere. Or maybe it is done in an entirely different way. Anyone have any ideas how this process actually works in Etsy ?
Notes: I know that when you setup a seller account in Etsy, you only have to give your paypal email address that you want the payments to go to, not give them any API access of any kind. I have tested this.
This is all in the context of setting up a website that essentially does the same thing, allowing a sellers to have their own mini shops on our site. The payment needs to go directly to the seller, and we need to confirm payment has been made by the buyer. I dont want the sellers to have to setup anything in the PayPal account or anything like that. So if you have any other ideas/suggestions how i can achieve this, I would love to hear them.
it knows this because of the success callback url.
On how to get confirmation of a transaction between two other parties, look at this question
So I guess not with express checkout, but certainly with Instant Payment Notification.
The only way I can think of doing this with Express Checkout is if each receiving party has a separate merchant account. As one answer by netom in this question
I don't believe Etsy uses Express Checkout, but rather, uses PayPal Adaptive Payments.
Using Adaptive Payments, you can change the receiver of the funds simply by specifying a different email address for the primary or secondary receiver.
See also my answer at Online payments for a middleman
As for the Etsy confirmation; since Etsy is the one making the API calls the PayPal - and only changing the receiver on a per-transaction basis - they can just specify an ipnNotificationUrl in order to be notified via PayPal IPN whenever a transaction completes.
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.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
ok heres my problem, im creating a site where people sign up first then pay straight after, my problem is what if the customer who signs up uses a different card to pay so for example, his wife. im trying to work out how to match the sign up info and the payment info without having to store the card details and get an ssl cert.. i need this so i can tell if they paid.. im writing it in php, it currently sends me an email when they sign up rather than straight into a database, any help?
Simplest thing that comes to mind would be to have options on the payment screen that let you:
(1) Use the billing info you supplied during registration
(2) Specify the name as it appears on the card (as most sites I've ordered from include)
Does this answer your question?
If you are concerned about matching the account to being paid if they use a different name, you most likely have some kind of $Session going on I would think. Use the user's login information from the Session() and then you can tell.
We use Authorize.Net for our payment processor. They have two different APIs which give you different levels of control (AIM - Advanced, SIM - Simple). From your description of not desiring a SSL Cert, SIM would be the best way to proceed.
We have designed our system to collect as much information as possible from the customer and then pass (via POST) to AuthNet's SIM method where they only need to enter in their card-specific information (number, expiration date, and CID). If the transaction is successful (and also in some failure cases), they notify us by a pre-defined 'silent-post' transaction and also redirect the user to a 'relay url'. We provide AuthNet with an order/invoice number as part of our original post data, so we can use it in their silent post to match up their payment with the appropriate order.
The SIM interface has worked well for us over the years and we now have it tweaked via CSS so that it closely resembles our site despite being hosted elsewhere, saving use far larger PCI-DSS compliance issues by doing everything locally.
im trying to work out how to match the sign up info and the payment info without having to store the card details and get an ssl cert
In that case the best advice is to use something like PayPal, Amazon Payments, or Google Checkout. Other than that, your question was a bit hard to decipher.
i need this so i can tell if they paid.. im writing it in php, it currently sends me an email when they sign up rather than straight into a database, any help?
Most 3rd party payment processors (PayPal, Google, Amazon), provide a way of checking payment status. Most also offer pinging a callback when the payment status changes.
PayPal IPN
Amazon IPN
Google Notifications
Many credit-card processing options will send a response to your server containing crucial information about the user that you can use to verify that they have successfully paid. For example, PayPal has an IPN (Instant Payment Notification). You can use the data returned in this to automate a process on your server that states the user has paid.
My advice is to contact whoever is processing your credit-card transactions and ask what options they provide for relaying information back to your server to verify which users have suffessfully paid for the products/services.