-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When processing a payment, can I get back the Transaction ID, etc? #70
Comments
Hi @MLyons10, the transaction ID can be found via the Here's a code sample of how to get the transaction ID for a sale payment, along with how it looks using the sample project: var payment = Payment.Get(apiContext, "PAY-89W644977H834061FKTDRCCY");
var transactionId = payment.transactions[0].related_resources[0].sale.id; |
Thank you very much for your help. That works perfectly. Am I able to get detailed information when an error is returned? I see that I get a 400 Error, but I was hoping to be able to get some detail as to what actually is the issue... I can't for the life of me figure out what is causing it to return an error... Thanks for your help. |
Yes, depending on where the 400 Error is encountered, a An easy way to test this in the samples is to inject bogus data into an object and view the details of the exception that is thrown. In the run below, I changed the sample for making a PayPal payment so the |
I should also mention that if you do get an error that you're having trouble understanding (some of the errors can be quite cryptic), sharing the |
Closing this issue as the questions have been answered. Let me know if there's anything else you need help with. :) |
I can't seem to find a way to do this anywhere, is anyone able to tell me how I might do this? I would like to log this for my records.
The text was updated successfully, but these errors were encountered: