NameSilo

PayPal IPN question - Again..

Spaceship Spaceship
Watch

user-7256

VIP Member
Impact
111
Sorry 'bout this; second question in such a short time about the same topic, but I'm so darn stumped it's not even funny. This is an EASY topic, too, so I don't know why I'm having trouble with this.

I just want to make sure there's no chance I'm doing something wrong. I realized that subscription (recurring) payments won't processes at each term with the "return" URL specified. It WILL call your IPN URL though, and should send all the subscription info variables there.

But what variables does it pass? I'm setting up an error checker to email me each time something doesn't work.

First I check to make sure the POST variable "tx" is sent. ... I mean, they DO send a variable called "tx", right?

I got errors that it wasn't sent. So I tried GETting it, even though that wouldn't make sense. It still wasn't being read by my IPN file.

So I tried "txn_id" instead. Both POST and GET. Still none found.

How the HECK does this work?? Wouldn't it be the same as processing it on the return URL like I was doing before? (This time, I'm using an IPN file that doesn't output any content to a browser.)

Thanks for any help.
-Matt
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
Yes, I have. That's why I'm confused.

It says it should be set but it's not.

And I know the IPN URL is configged properly because each time I test it, I'm getting emails I made notifying me of the errors.
 
0
•••
paypal forward a transaction id with the name txn_id also if it is a refund it will also send you a variable called parent_txn_id which will be the same as the txn_id of the original payment (refunds get their own transaction id so this is used to know what it is a refund for).

As you are already sending yourself an email on the transaction why not send the value of the $_REQUEST global array as well so you can see what variables paypal sent.
 
0
•••
A genius idea!

Okay, looks like I'm getting two emails though. (Once I found the txn_id var, I only had emails print that variable).

So I get two emails: the first one is blank. No txn_id - the second one, though, has it.

So when I do if (!$_POST['txn_id']), it returns true (as in, not set) and exits and thus doesn't process the payment.

Why does it send two emails? What gives?
 
0
•••
for us to be able to help properly it would be best for you to post the code,
 
0
•••
I realize that, but for security reasons - I don't think I should do that; it's the code for my company's billing system: launching Tuesday. (I have an alternative in mind that I can use temporarily if needed; so this won't set us back.)
 
0
•••

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back