How to configure paypal sandbox for testing - paypal

We have an IPN listener already from integration of another paypal api. Now I want am trying to intregate a payment button to a web soolution, which should then be able to report to the existing IPN listener.
I have a login to the paypal devlopers site. I see the IPN simulator there but as I understand it that allows me to create a message and send it manually. Is there any way to configure my sandbox account to send IPN notifications to the listener when I send a click from the web button to the sandbox. In other words I want the IPN message to be created based on the info I send with the web button, in the same way as it would in the live system, not to be my guess as to what message will be created then. I don't see where to configure the address I want notifications sent to other than for the simulator.
Also, is there any way to test with a currency other than USD?
Thanks,
Adam

For IPN, the easiest way is to pass the URL of your IPN handler in the notify_url variable of your button.
Currency codes can be tested by passing the currency code in the currency_code variable of your button. A list of currencies PayPal supports can be found at https://developer.paypal.com/webapps/developer/docs/classic/api/currency_codes/ .

Related

PayPal Sandbox Invoice Paid but stays in SENT status

I am testing out the payment of an invoice in the PayPal sandbox environment.
I use the API to create and send the invoice. The status shows as SENT. I click the link returned by the /send method to open an view the invoice. It opens up as expected in my browser in the Sandbox environment. I click on the "Pay" link, and a popup window opens and I process a credit card payment.
However, when I then query the status of the invoice in the API, it remains in SENT status. Should this not advance to PAID?
Also, I have configured the INVOICES.INVOICE.PAID webhook as well as the PAYMENT.AUTHORIZATION.CREATED webook, but neither of them fired when payment was made.
Can anyone tell me what I am missing?
Does the receiving account have a confirmed email identifier within the sandbox environment?
Check and resend any confirmation message within https://www.sandbox.paypal.com/businessprofile/settings/email
Read any confirmation message and follow its link and steps, via https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fnotifications%2F
If that's not the issue, you'll need to post more detailed information of the responses you're getting.
Turns out the issue was that I had to use a specific credit card defined for the account in the Sandbox environment. Once that was done, all processed as expected.

issues with notify_url in paypal

I am a developer and we have paypal payment sytem integrated with our shop since long.
We have implemented the notify_url paramter in checkout code and was working fine since 4 months back. But now we could see that when a payment is done, we are not notified via the notify_url we specified. But however if we check the url via the IPN simulator, we can see everythign works as expected, but not not notifying automatically when payment is done .
What could be the issue or what all do we need to cross check for this issue to be solved
Did you received any 'PayPal Instant Payment Notification Warning' email from PayPal? This email could be telling you that there's an issue with your IPN URL when PayPal trying to post back the notification to your server, and that could be the reason you didn't receive the notification message from PayPal.
Otherwise, I would recommend you to contact PayPal technical support via https://www.paypal-techsupport.com/app/ask and providing the detail of your PayPal account for them to troubleshoot on this issue.

Paypal IPN not firing?

I have a question about Paypal IPN, I was wondering when does the IPN activate and send it's message to my website.
I currently have my website that has a buy button. When the client buy the service, he is directed to paypal. Once he pay the service, nothing happen. In order for me to receive the IPN notification, the user has to click "Return to merchant website" or whatever the link is, then I receive the IPN notification.
Is it normal, does it work like that for everyone?
Cause right now, most people when they are done with the payment, just close the website and I don't receive any notification.
Thanks for any help !
Your question leaves a lot of missing information so I will go through each option for you:
Read here about how to setup a sandbox account if you don't already have one: https://developer.paypal.com/docs/classic/lifecycle/sb_create-accounts/
Bare in mind that your sandbox account is entirely separate in every way from your live paypal account. All settings will need to be checked and customised as needed.
Set up your IPN URL on your sandbox account Here: https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_profile-ipn-notify
Once set up, you then need to download and set your code (PHP or something else) to the listener (referenced in the above sandbox profile link). You can find IPN code examples here: https://github.com/paypal/ipn-code-samples
When that's all set you need to set your listener to using the sandbox mode and then log in to your live account and then run the IPN simulator from here: https://developer.paypal.com/developer/ipnSimulator/
Paypal will send messages to your IPN listener and you need to do something with the messages, typically output them into some sort of log file. Any issues, you can read Paypals feedback and IPN data/delivery information here https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.4 [Found from History->ipnHistory on the Paypal menu] and it should list them out. You can resend any failed or queued or undelivered messages.
Paypal is a terribly documented and terribly structured system for coding with. I hate it. Use Stripe.
I love bullet points.
Paypal claims they will try and resend failed/queued IPNs 16 times over 5 days. I have yet to see this, you need to resend them manually (at least, sandbox ones)
Please remember all the settings and changes you have made to your Sandbox account will need to be also made to your live account before you make your payment system live!
Solution
My return_URL is the location of my IPN.php file which take care of the data sent and received. My problem is that the IPN is only firing when I click the "Return to merchant website" and not when the payment is actually completed
What you have done, from reading your comments, is set your IPN page to being your return from paypal page, this is NOT the way IPN is supposed to work, the IPN page should never be visited by the customer, only ever by Paypal.
Read through my anwser (points 2,3,4) and set up your IPN web link as I have described above, your return_url value should be a basic page to say to the customer "transaction complete". The IPN page is defined on your paypal accounts (sandbox and live) as I stated above.
This will fix your problem.

Buy Now Button/IPN Simulator

I have set up a Buy Now button on my website.
Upon transaction being completed I then direct the PayPal data to a script on my server.
What I need to know is, is the data sent by the Buy Now button the same as that sent when using the IPN Simulator?
If not, where do I find a list of the variables/data sent by the Buy Now button?
Yes, IPN simulator Web Accept Transaction Type should simulate the same information back to your IPN listener.
This is the documentation link for all the IPN variable that PayPal will returned to your listener.
https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/

Send Paypal IPN to a secondary email (NOT the primary) How?

My developer is trying to get the instant payment notifications for one of my web products to be sent to a secondary email, not the primary Paypal one. But no luck so far -it keeps getting sent to my primary email. I'd like some help on how to get it sent to a secondary email account?
Thank you
Your email address doesn't have anything to do with where the IPN gets sent. You basically have 2 options for configuring IPN.
1) Log in to the PayPal account that is receiving the payments, go into the profile, and then into Instant Payment Notification Preferences. Enable it, and add the URL to your IPN listener. This will now act as a default IPN listener so every transaction that hits your PayPal account will send an IPN to this URL.
2) If you include a notify URL in your button code or API calls this will override what you have setup in your profile. If you need to send IPN's for a specific button or API call to a secondary IPN listener you can just add that URL to the notify value for the request and that's where the IPN's will go.
If you need IPN's to hit multiple scripts you might want to take a look at this article I wrote awhile back about daisy-chaining PayPal IPN scripts.