PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, November 21, 2022

[FIXED] How can a paypal developer see the transaction details?

 November 21, 2022     paypal, paypal-rest-sdk, paypal-sandbox     No comments   

Issue

We are using Paypal as our payment backend, and we want to automate the accounting process at the end of each month, i.e.,

  1. Get the sum of all the received payment each month
  2. List all all the received payment -- how much each transaction is

After making the paypal transaction, I can get the orderID info below:

enter image description here

I logged into my paypal console, I can see the list of API calls.

enter image description here

First of all, the API call IDs on the console do not seem to meet the orderID, is there a way for us to find the relationship?

How can we do accounting based upon the history of API calls listed on the console? Or is there any management API for us to do payment history investigation?


Solution

Payment approval isn't an important step for accounting purposes, forget about that data.

When a payment is captured, purchase_units[0].payments.captures[0].id is the PayPal.com transaction ID, and that same data can later be obtained with this API call: https://developer.paypal.com/docs/api/payments/v2/#captures_get

That's the relevant accounting data, for a single transaction.

To get the data for multiple transactions, use PayPal.com reports. There is a Reports tab, you can download transactions for a month in CSV format.



Answered By - Preston PHX
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing