I use the payflow api to charge credit cards, I receive and store the PNREF. I need to retrieve the fee paypal deducts from my sale which is not returned in payflow's response. I setup credentials and a signature for the API and proceeded to use the getTransactionDetails method to retrieve the FeeAmount. I can authenticate but when sending the 12 char PNREF I get the following error:
Error: The transaction id is not valid
I think the API is expecting 17 characters but I only have 12. Is it possible for payflow and the paypal API transactions to interoperate?
The GETTRANSACTIONDETAILS API is a PayPal API and it accepts a 17 character long ID to be passed . If you have the PayPal as the Processor and you use the Payflow API's then you will get the PNREF and the PPREF in the response parameters. You need to use the PPREF as the transaction ID in the GETTRANSACTIONDETAILS API to make it work .
Related
Is there a way I can get paypal receipt id in response when using paypal express checkout.
I do get the transaction id but i need receipt id. Paypal is sending receipt id to customer via mail but i need it in API response.
Only way to get Receipt ID, you have to call the GetTransactionDetails api and can get receipt id from here.
Docs: https://developer.paypal.com/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/
I have setup PayPal Sandbox test accounts, a Personal (buyer) and a Business (merchant).
I'd like to test a PayPal 'DoCapture' API Operation. The problem I'm encountering is that I need an AuthorizationID and don't know how to obtain it. If i run the 'DoExpressCheckoutPayment' API call, I do not get an AuthorizationID returned, using the merchant API credentials, though I do get an 'ACK' of success. Do I need to be using the buyer credentials with the 'DoExpressCheckOutPayment' call? I don't see the API credentials in the PayPal Sandbox profile for the Personal account.
Express Checkout example with authorization and capturing you can find here.
Short answer - according with DoCapture documentation
AuthorizationID ... This is the transaction ID returned from DoExpressCheckoutPayment...
According with DoExpressCheckout documentation you need field from response, attention, PaymentInfo#TransactionId
... this value is your AuthorizationID for use with the Authorization & Capture APIs.
This is what you need to do to implement the capture API.
Create Payment: set intent as authorize in its request to get payment Id
Show Payment Details: to get approval_url. The customer will use this URL to pay for the order.
Execute approved PayPal payment: Use this API after customer successfully pays for the order. This API returns authorization-id along with capture link.
Use Capture API: use the URL obtained from step 3 to capture.
Use this link and check payments API.
https://developer.paypal.com/docs/api/payments/#payment_execute
Hope this helps to someone who stumbles upon here.
As far as I can tell, this doesn't exist yet, but I was wondering if anyone knew if there was an equivalent of the PayPal Payments Pro NVP call "GetExpressCheckoutDetails" in the new PayPal REST API.
The REST API documentation lists information on authorizing the sale and the redirect contains the token that would be used in Payments Pro but there's no docs on how to retrieve the Billing/Shipping info prior to executing the sale (after which I assume you can retrieve that information through the "Look up a payment resource" call of payments/payment/{id}
Tangential question in case PayPal official response comes in: Is recurring payment support coming to the REST API soon or will it be exclusive to PayPal Payments Pro?
You can look up a payment resource even before you execute it. However, we have a bug in the API that doesn't currently return the shipping information.
When I try to call RefundTransaction API method usiong PayerID i get Error "13606 Feature Not Enabled. You are not enabled for this feature.".
What it does mean? Is there a way to enable it?
To reproduce you can go to https://devtools-paypal.com/apiexplorer/PayPalAPIs and try to execute RefundTransaction method with PayerID and Amount filled in.
Direct from PayPal Support:
TransactionID and PayerID are marked "conditional", but you couldn't set blank.
For example, A buyer purchased several items in different period , but if you call RefundTransaciton API only set PayerID,
PayPal couldn't judge in which transaction to refund, and also could not refund the amount about all of these items.
PayPal is not allowed this case happen.
So at least you have to set the transaction ID while calling the refund API.
So the solution is to always specify TransactionID.
Yes, their own API Documentation says:
"Either the transaction ID or the payer ID must be specified."
But apparently this is not the case.
If you don't log subscr_payment IPN calls, you can look up TransactionID from a PayerID by using the TransactionSearch API request. Put your PayerID in the ProfileID search field.
I want ask,may i Pay with Payment Advanced what use Payflow,but refund use REST.I do this,but when i fefund,i get "Exception in HttpConnection Execute: Stream was not readable.".Now i want know is Payflow can use with REST,is anybody success do this.
Currently you cannot pay with Payflow and the refund with REST. The REST API uses a separate set of (resource) ids, this means that the REST API refund operation expects an id that comes from a payment made with the REST API.