Paypal express checkout get receipt id in response - paypal

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/

Related

Retrieve transaction id paypal

I create a recurring payment by using paypal express checkout without call DoExpressCheckoutPayment. Do you know how can I get transaction ID after created Recurring Profile?
If you do not call DoExpressCheckoutPayment, the recurring payment profile will not be created and thus will not have a Transaction ID associated with it.
The transaction ID will be returned in the DoExpressCheckoutPayment response.

Is it safe to send Paypal transaction ID to buyer via email?

I'm creating an e-commerce shop using Paypal Express Checkout payment. Inside IPN callback, after required checks I send a confirmation email to buyer. Inside this e-mail I would like to include Paypal transaction ID, to let user easily communicate with vendor about order, if necessary.
Is it safe to send Paypal transaction ID to buyer via email?
Yes, the payer will get a paypal email with the transaction id anyways.

getTransactionDetails fails when sending PNREF from payflow

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 .

How can I check the sample email sent by PayPal Invoice API

I'm trying to check how the paypal invoice looks like when it send email to the payer, however, the api doesn't seem to send the email. In the api response, there's a Invoice Url, I was able to see it but it requires the payer to login. Does the API send an email to payer's email or not?
From the PayPal Invoice API docs:
To use the Invoicing API to request payment, you start by making one of the Invoicing API calls to PayPal. Your customer receives the invoice via email and clicks on an included link to view the invoice on PayPal's website. Customers who have a PayPal account can log into their PayPal accounts to pay the invoice. Customers can also pay using a check, debit, or credit card.
(https://developer.paypal.com/docs/classic/invoicing/gs_Invoicing/)
As long as the "ack" field in the JSON response from the API shows "success" as value, an email will be sent by the buyer. He or she has to click the link and login to complete the payment.
Example JSON response:
{
"responseEnvelope": {
"timestamp": "2011-06-16T:12:30.861-07:00",
"ack": "Success",
"correlationId": "78733df04b1f0",
"build": "1942837"
},
"invoiceID": "INV2-C4AK-UU3J-5SCL-9KZY",
"invoiceNumber": "1192",
"invoiceURL": "invoiceURL"
}
so the answer to your question is YES;
Try sending yourself (or another account you control) an invoice. This will give you an idea of what the invoice looks like.

DNN and PayPal, how to sent email to customer after payment has been made

In my DNN website, using Paypal's Checkout button, when user has click the buy button and sent to Paypal. Make a payment and then redirect back to my site.
Question:
How can I get that customer email address (from Paypal) so that i can sent a conformation email to him/her from my DNN website?
thanks.
Two ways; you can either call the GetTransactionDetails API and supply the TRANSACTIONID as a parameter. 'EMAIL' will contain the buyer's (PayPal) email address.
Or you can use PayPal IPN to get notified through POST whenever a payment / action has been made.
GetTransactionDetails API doc is at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails
You can also have a look at TransactionSearch for past transactions.
In case you want to use IPN, just supply NOTIFYURL in your SetExpressCheckout and DoExpressCheckoutPayment call if you're using Express Checkout, or if you're using Website Payments Standard.
Remember to send the POST back to PayPal for validation at paypal.com/cgi-bin/webscr?cmd=_notify-validate and check for a VERIFIED / INVALID response.
Some sample code and docs for IPN is available at https://www.paypal.com/ipn/