Paypal Transactions not showing up in Sandbox, but appearing in notifications - php

I'm using the PHP-SDK to send REST requests to Paypal.
My transactions seem to succeed, both accounts get notifications, the seller getting "Notification of payment received" and the buyer "Receipt for Your Payment to xxxxx's Test Store" respectively. Both accounts' balances change according to the transaction. Yet there are no transactions shown in the transactions tab.
What's going on?

That's because they don't show up there (a recent change), only failed transactions show up there for debugging purposes.
You want to log into sandbox.paypal.com with your dummy buyer account to see your list sandbox transactions, it's that simple.

Related

PayPal PHP REST API: Payment review has no effect in sandbox testing

I am developing a payment solution using the PayPal PHP REST SDK. Everything seems to work OK in the sandbox. I can make payments, and all the transactions show up on the dummy accounts for the seller and the buyer.
Now, I want to test with Payment Review, and have enabled this for one of my test users. According to this documentation
https://developer.paypal.com/docs/classic/lifecycle/sb_payment-review/
all transactions initiated by this user, should be set to "pending", but this doesn't happen. Alle transactions go through as normal. I've tried setting the seller account to payment review as well, but also with no effect.
Another issue is that none of the transactions appear under "Sandbox transactions", even though they appear in the respective paypal accounts of the dummy seller and buyers.
Is there something here I'm missing, or are these features just not working for the REST api?

Paypal Website Payments Pro transaction not getting listed in the Sandbox account

I have created a simple PHP App for requesting(nvp format) paypal to accept payment from my customers through on-site payment with credit-card, even though when I test it with dummy cards & I get success message in the response, the transaction is not getting listed in my sandbox account "Recent Activity" page or "View all transactions" or "Payments Received".
My Payment type is sale and I am calling "DoDirectPayment" method.
I have already enabled "Payment Pro" for my sandbox account & also the account is "Verified", still transaction entry not getting listed.
Can somebody guide me with a detailed explanation about the issue that might be causing this ?
I am using this as my reference.
https://github.com/GeorgeOld/Paypal-NVP-PHP-code-examples

Logging PayPal payments in application

I have several ambiguities in using paypal methods and cases, when IPN messages are sent. Im developing app, in which im using paypal(sandbox) for making deposits and cashouts. Each of these both transactions I want to log in my app and here some obscurity raises becouse I need to capture as many cases that may occur. So I'll take it gradually and I'll be thankful also for each partial response.
Firstly, I have some general questions:
In my app, im using BuyNow button, AdaptivePayment methods PAY and PaymentDetails and Merchant method GetTransactionDetails. Are these methods part of Bussines account and for free (there are no monthly fees) right? I cant afford to pay some monthly fees from begining.
May arise any problems, when i'll deploy it to non-sanbox environment?
cashout
For cashout Im using Adaptive payment PAY method.
When My app client make a cashout to his/her paypal account, I can catch through IPN message, that payment is completed and using AdaptivePayment PaymentDetails method and Merchant GetTransactionDetails method I can find out, that there is pending status with paymentreview reason. So on receiver side, where I dont have access, is payment review possibility. Thus receiver can DENY payment and here is a question, how to get information about this user action, becouse an IPN message doesn't come.
Another case that im facing is when client of my app make cashout to
his/her bussines paypal account with different currency from sender
(my bussines paypal account). There is pending status too, but with
reason "multicurrency" in IPN message. Here is similar problem to
previous point 1)... again, I cant get IPN message, which
determine, if user accepted or not the transacion.
deposit
For deposit Im using PayPal standard Buy now button.
PAYER SIDE(my app client): I dont understand, why there is payment
review (accept/deny) in payer account profile, when status of
payment is completed? Is it common behavior only in sandbox
environment? Or is it possible accept/deny payment on payer side in
non-sandbox?
RECEIVER SIDE(my bussines paypal account): There is payment review
too, on receiver side, and if im right, these links (accept/deny)
are similar to links on payer side, arent? There is refund
posibility too, exists some API method to refund programatically?
Correct, each of the products you mentioned do not have a monthly fee.
If a user accepts or denies a pending payment that would trigger another IPN with the completed status. Are you saying you've tested this specifically and you're seeing otherwise?
Receivers would only have to accept/deny in cases where there is currency conversion or maybe they have fraud filters set to flag specific transactions, etc. In most cases there should be no review necessary.

Your payment will arrive in 3-5 days

I have a website (in development) which is using paypal (sandbox) to accept payments. I've setup a few sandbox users so I can test what happens when payments are send from my country and some foreign countries.
I've noticed that when setting up users with certain foreign countries, after making a payment, the foreign sandbox account gets a message saying "you're payment will arrive in 3-5 days". But the payment happens instantly in the sandbox account.
Why is that, is that just a sandbox thing? What I am asking is, when I go live, and if the user gets such a message, and if it does take 3-5 days for the payment to arrive, will paypal push the payment through to my ipn page as and when the payment happens, i.e. 3-5 days later?
I'm assuming that because I am using the paypal sandbox, they just display the 3-5 day message and push the details to my ipn page straight away?
Any time you get a payment that is pending for any reason you'll get an IPN at that time with a payment_status of Pending. When the status changes you will get another IPN with the updated status.

How do I get data back from Paypal so I can alter my MySQL database accordingly?

I'm just starting out with Paypal, so this is a newbie question.
I've been going through the instructions for setting up Paypal subscription service, but I think I'm looking at the wrong thing.
What I want to acheive is to get back some kind of response from Paypal so that I can update the database on my web site to mark a registered user as having paid. Basically I have a flag in the database that says if the user is subscribed or not. I want to ensure that the user is marked as paid so long as their Paypal subscription is maintained.
While the instructions linked above do say how to set up a button to receive a payment, there's nothing there about getting any data back from Paypal.
I know there are terms like IPN and sandbox that are related to what I'm trying to do, but I can't find clear instructions for how to get started on this process. I'm just circling around and not getting anywhere.
Where do I start on setting this up? Where is there a clear beginner's tutorial?
Also, I'm using PHP/Javascript/MySQL on my website.
PayPal's IPN service is what you want to use. I've used it myself to do just what you're looking to do.
Instant Payment Notification (IPN) is PayPal's message service that
sends a notification when a transaction is affected. Once IPN is
integrated, sellers can automate their back office so they don’t have
to wait for payments to come in to trigger order fulfillment. IPN can
send notifications for these transactions:
Instant payments, including Express Checkout and direct credit card payments
eCheck payments and pending, completed, or denied status payments
Pending payments
Recurring payments and subscriptions
Authorizations
Disputes, chargebacks, reversals, and refunds
You can also view notifications on PayPal’s IPN History page and
resend them if you need to. As PayPal’s interface for handling
purchase confirmation and server-to-server communications, IPN can
also be used to manage and customize a variety of APIs and
communications, including:
Customize your website's response to customer purchases in seconds
Track customers via IPN "pass-through" variables
Notify sellers who deal mostly in software downloads and other digital, online goods
Track affiliate sales and commissions
Store transaction information in your own database
For more about IPN:
Technical Overview (link to new html version of docs on developer central)
Instant Payment Notification Guide (PDF)
Code Samples
I'm not sure if its the same thing, but I just setup my friends website with Express Checkout, and I wanted to add all paid orders to an orders table in my database.
After I call SetExpressCheckout, and the user is returned to my site after going through the purchase flow on Paypal's side,
I used the information from GetExpressCheckoutDetails.
Then, if DoExpressCheckoutPayment
is successful (also called from the "callback" page) I then do the appropriate work in my database as far as logging the order details. For you in this case, it could be updating a record for the user in the database.
Hope that helps a little.

Categories