I am integrating PayPal into my website and need to know how I can confirm that a payment has been processed or not.
I need PayPal to send me a response via PHP get that confirms the payment. Is there an option?
Thanks.
See the "Completing the Express Checkout Transaction" section of this page. After you send the request, PayPal will send an NVP response including the transaction ID.
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECSimpleIntegration
If you aren't using the Express Checkout API, and instead using Website Payments Pro, there is documentation at the link on the left-hand side that details that.
If you have a more specific question, feel free to comment. :)
Related
How can i use IPN for PAYPAL PAYMENT ADVANCED?
I am working on a website where the payment system needs to be changed from paypal standard to paypal payment advanced. The transaction type for the website is almost always a 'Authorization'. So, we capture payment later when we ship the item.
The problem i am facing is finding a way to receive IPN or something equivalent for it to update the system if transaction has been captured. I used to use the CUSTOM and notify_url for reciving IPN in the old system. But I dont know what to use for PAYPAL ADVANCED.
note: i am using OpenCart, PHP and layout A for paypal advanced.
Im haing a problem iv been researching for weeks now on the paypal API but i just can't figer how to do this.
I need there to be a button on my website which then it goes to paypal.
Once you have paid the chosen amount it goes to a php page which updates the database though php.
You have to turn on paypal ipn in your paypal preferences. Once paypal has the money it sends you a transaction back to your server. In the script that accepts the transaction you can have it update your tables.
Documentation : https://www.x.com/sites/default/files/ipnguide.pdf
generally you pass a notify_url parameter with the request, and set up a page which handles and validates IPN notifications, and PayPal will send requests to that page to notify you when payments/refunds/etc. go through. That IPN handler page would then be the correct place to update the database to mark orders as having been paid.
i found a tutorial here: http://net.tutsplus.com/tutorials/php/using-paypals-instant-payment-notification-with-php/
I found more suitable the PayPal NVP API instead of tradional IPN (Instant Payment Method)
You can find several code examples for PHP (including very similar to your problem and more advanced) in the library code for NVP samples
I am new to sandbox and paypal payment gateway. I am using paypal adaptive payment to pay amount to two people at a time. My current code works perfectly. I am using the paypal generated code. I just want to know that is it possible that when the payment is made successfully can I make that entry to my database. I have my php code, but where do I need to write this?
Thanks in advance(plzz no down votes)
You should wait for the IPN message that contain details about the payment status
https://www.paypal.com/ipn
You need to define the url of the php script that listen for those messages in your paypal account. There are some php examples on how to implement it.
I'm looking to implement a very simple Paypal integration whereby I can enter a valid Paypal Email address (recipient) and a dollar amount, and click "Pay." Ideally, it would send the money from my paypal account automatically via my API key.
I currently have Mass Pay set up with PHP, and it's working fine, except that it charges me 2% on every payment, and doesn't pass back the Transaction ID. It also kinda seems unnecessary since I don't need to pay multiple people at once.
Since I only need to do one transaction at a time, I'm wondering if anyone knows of a simpler Paypal API for single outgoing transactions from my account.
I've been reading the documentation all day and I've yet to find what I'm looking for.
Any advice is greatly appreciated!
PayPal has sample codes for integrating various PayPal features on it's website. This includes PHP take a look at the list of features and I'm sure what you are looking for is there.
Also from the paypal site:
PayPal receives the MassPay request and returns a response indicating
success or failure. If PayPal returns a successful response, then
PayPal processes the payments and, if you have Instant Payment
Notifications (IPN) enabled, PayPal sends a notification to the Notify
URL specified in your account profile. If you do not have IPN enabled,
you can view the details of the MassPay transaction in your PayPal
account.
This implies that in the case of mass pay you need to provide a URL where paypal sends payment notifications. Your program can probably check this url to figure out whether a payment has been made or not, I would suspect this would be the case for all payment integration. That being said I would print_r the the response from paypal, I'm sure something like a transaction id will probably be in there. In the case of DoAuthorization it does return the transaction id
In the case of mass pay it does return the transaction id if IPN is enabled
I want to return the invoice generated after a PayPal payment on my website. How do I get the PayPal invoice generated after this payment is made?
Your question is not 100% clear. PayPal already sends an invoice (you can customize this from your PayPal account) upon payment completion.
What you can do on your side is to handle payment confirmation using PDT or IPN. I would recommend the second one since is more reliable. Once you get the payment confirmation through IPN you can send to customer your own generated invoice based on the order data.
If you are interested to easily integrate your custom shopping cart with PayPal please read this article.
You can get every information from PayPal using PayPal API.