PHP Paypal SDK get all tranactions - php

I am trying to setup my code to archive every transaction from the PayPal user's account. I have the PayPal SDK setup and the auth token is stored in my database.
I am using the paypal/PayPal-PHP-SDK and the PayPal\Api\Search but I don't know how to use it. Any suggestions?
Whats the best solution to pull all of the transactions from paypal, is it possible?

The example is here: PayPal-PHP-SDK/sample/sale/GetSale.php
You need to get all payments first - https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/payments/ListPayments.php

Related

Paypal: Login with paypal to get payerId

Currently I'm working on a paypal integration using the paypal php SDK.
When a user successfully finished a payment, paypal will provide me the payerId.
Is it possible to get the same payerId at a later time by letting the user login to paypal again (without a payment). That way I can match the payerId with one I had stored earlier when the payment was finished so I can determine what products the user is entitled to.
I have gone though the available API functions, but it doesn't seem to have this case.
Maybe I'm going about this all wrong, I'm fairly new to this.
Any help is appreciated,
Corjan
Yep. If you integrate with LIPP (log-in-with-paypal) you can have the user log-in without making another payment, then you can retrieve their payerid using oauth.
https://developer.paypal.com/docs/integration/direct/identity/log-in-with-paypal/
Alternatively, you could just associate the items that user has bought with their account in your own database.

A way to verify PayPal Account Status is Verfied using PHP

Basically I want my users to associate PayPal account in their accounts for identify verification purposes. I am developing a marketplace site and wanted to integrate paypal as my identity verification procedure.
Is there a way to verify email address, first name and last name using PHP like using $_GET variables or $_POST variables? If there is can you show me how?
I tried search and I get Adaptive Accounts GetVerifiedStatus API. But that totally new to me, I don't know where and how to start.
Your best bet here is to make them start, but not complete, an Express Checkout. A normal Express Checkout (referencing Classic but REST works the same way) looks like this
SetExpressCheckout - Tell PayPal you want to authorize $1.00 and have them log in and authorize the payment
GetExpressCheckoutDetails - Take the token from step 1 and get their PayPal account details. Included in this is PAYERSTATUS, which will tell you if their PayPal account is verified or not
DoExpressCheckout - You won't do this, but this is where you finish the process and get funds. Since the data you want is in Step 2, just ignore it and the session will expire.
You could implement GetVerifiedStatus API to determine whether the specified Paypal account's status is verified or unverified.
To use that API, you need to submit the application request to Paypal for approval first. Submission portal link here.
Then use the GetVerifiedStatus API call directly, refer to API request fields,link.
Sample SDK download link.

Getting transaction list from Paypal Access

I'm using Paypal access to login. But after login I need the paypal transactions.
I used sample code from https://github.com/paypal/paypal-access
Everything worked fine. But I don't understand how to get the transactions. Is that possible using Paypal Access? if not then how to do it? You may take a look at http://www.storenvy.com/ . They pulled paypal transactions.
Any idea?
You can use the TransactionSearch API combined with GetTransactionDetails to obtain everything you need.

How to use Paypal Standard in a web application with PHP

I'm looking for a way to build a web application using paypal payments standard. I'd like the user to get redirected to paypal, then fill out their information, and upon completion, add a value in our database saying that they successfully paid. I haven't found a solution or answer to this.
I found this thread for RoR, but didn't find anything for PHP
Paypal Website Payments Standard with a Ruby/Rails application
You can see instructions for a Payment Data Transfer at PayPal's site. Basically, you post the transaction amount and an ID token to their site, the customer pays on paypal.com, and then they're sent back to a pre-defined URL on your site with the transaction details.
I used the NVP API to do that.

Which payment method do I need to use for PHP PayPal API?

I need to setup a payment method on my website that allows a certain user to pay another via two email address'. So essentially, user1 comes to a page, downloads an invoice and has the option to pay that invoice using a link which redirects to paypal with the prefilled details i.e. payeremail, receiveremail, amt, currencycode. Does anyone know which API call I need to make to do this? All I can really see in the API is for other users to pay my account which I already have setup for another function. Thanks in advance.
You need PayPal IPN, after the payment goes through you will receive following information https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables
Here is PHP handler for the IPN, http://www.boolcast.com/development/joomla-custom-paypal-ipn
You can also look at other sample code example on PayPal site.

Categories