Mooktakim Ahmed
Mooktakim Ahmed

Reputation: 1031

Paypal Adaptive Payment IPN fees information

So, i don't know if i'm going crazy or what, but for the life of me I can't figure out how to get payment Paypal fee amount.

For a standard payment, you get this information in the IPN. You get gross, net and fee amount. (along with other buyer info).

I had a look at the PaymentDetails service, but that doesn't show the fee amount either.

Does anyone know?

I need the net, gross and fee amount for every payment.

Upvotes: 3

Views: 705

Answers (1)

Maxime
Maxime

Reputation: 8969

I found that you have to activate the IPN in your Account to receive 2 notifications per transaction. Specifying the ipnNotificationUrl parameter in your adaptive PAY call is not enough to get everything. You will get the total amount and some transactions ID but nothing about the buyer except the Paypal email used for the transaction.

If using PHP, DO NOT rely on $_REQUEST or $_POST parameter to get all variables from Paypal. You will need to use php://input to get all the data sent by Paypal.

E.g.

$input = file_get_contents('php://input');

This will return a string that your need to parse to get

Upvotes: 1

Related Questions