tmartin314
tmartin314

Reputation: 4171

What's a good way to determine where POST information was sent from

I am writing a Instant Payment Notifications script for paypal in PHP. There are going to be other payment processors down the road, but they're going to be handled by the same function.

So I need to find a good way to detect where the post information came from.

Anyone have any experience handling paypal responses that could offer a suggestion?

Upvotes: 0

Views: 33

Answers (1)

RichieHindle
RichieHindle

Reputation: 281365

The difference processors will send their IPNs in different formats. So for example, PayPal will send a txn_type field, whereas a different provider will send some different field.

(I don't want to tell you you're doing it wrong, but... rather than trying to sniff out which provider an IPN is coming from, why not just give different providers different IPN URLs? Then you'll know for sure, without needing to work it out.)

Upvotes: 1

Related Questions