Reputation: 145
Very confused by the crowd of paypal-APIs, I wonder if I just can fetch the transactions (in and out) somehow, just like I would it export to csv via webinterface.
Here I am:
Payment.all.size == 0
paypal-rest-api-list-payments-returns-no-entriesMerchant-API does not allow detailed info for specific transactions. https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/GetTransactionDetails_API_Operation_SOAP/ says:
Note The details for some kinds of transactions cannot be retrieved with GetTransactionDetails. You cannot obtain details of bank transfer withdrawals, for example.
I recieved a view transactions via transactionSearch. Took the transactionId from one of the transactions.
api.get_transaction_details(:transaction_id => transaction_id>)
=> #<PayPal::SDK::Merchant::DataTypes::GetTransactionDetailsResponseType:0x007fd3c0f1f8d8
@Ack="Failure",
@Errors=[#<PayPal::SDK::Merchant::DataTypes::ErrorType:0x007fd3c0f379d8
@ShortMessage="Invalid transaction type",
@LongMessage="You can not get the details for this type of transaction",
@ErrorCode="10004",
@SeverityCode="Error">]
PaymentDetails
with transactionID) throws an "internal error 520002" with no details. (And I found no specification if it could fetch all transactions)Ok, it's Paypal. But there must be a simple solution they forgot to mention. (?!) Or what did I miss?
Thanks and regards, Phil
Upvotes: 3
Views: 2148
Reputation: 26056
I don't know where you're seeing info that the merchant API won't provide details about transactions, but that's simply wrong.
You you can use TransactionSearch to obtain a list of transactions within a given time period, and then you can loop through those results and use GetTransactionDetails to obtain the details for each individual transaction.
Upvotes: 0