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.,
- Get the sum of all the received payment each month
- List all all the received payment -- how much each transaction is
After making the paypal transaction, I can get the orderID
info below:
I logged into my paypal console, I can see the list of API calls.
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)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.