Jim R Posted July 25, 2018 Share Posted July 25, 2018 I'm having a hard time wrapping my head around PayPal's IPN and PDT information. (I assume if you can help me you know what those mean.) However, I'm not trying to pass information from the transaction to my site because the person who pays isn't truly my concern, and the emails don't always match. Parents sign up their son for a basketball league. I have a great form that separates participants based on a couple of factors to three different price points within PayPal. All I want to do is send the player's name and school to PayPal and have it returned as they're sent back to my site after completing payment. From there, I can take that information, Update my database accordingly. I know how to pass variables through URL's. I just don't see much in the way of returning variables which have little to do with the transaction relative to PayPal's needs. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/ Share on other sites More sharing options...
ginerjm Posted July 25, 2018 Share Posted July 25, 2018 I know nothing about your interface but the usual thing is 1 - you send the arguments via the url; 2 - the Paypal api uses that info to do something 3 - the Paypal api determines what you get back My point being that Paypal and their api determine the return, not you. What leads you to believe that you can get something back from Paypal? What kind of documentation do you have on the IPN and PDT? Any info in it on the values that are or can be returned? Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560050 Share on other sites More sharing options...
requinix Posted July 25, 2018 Share Posted July 25, 2018 You can pass a custom value to PayPal with the transaction. They will send it back to you in their messages. Use that value as an identifier for the order (which you should be storing), and obviously you know who the user is from the order. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560051 Share on other sites More sharing options...
Jim R Posted July 25, 2018 Author Share Posted July 25, 2018 2 hours ago, ginerjm said: I know nothing about your interface but the usual thing is 1 - you send the arguments via the url; 2 - the Paypal api uses that info to do something 3 - the Paypal api determines what you get back My point being that Paypal and their api determine the return, not you. What leads you to believe that you can get something back from Paypal? What kind of documentation do you have on the IPN and PDT? Any info in it on the values that are or can be returned? I've read through their documentation, but as you could imagine, it's mostly about passing transaction information from PayPal, most of which I don't need/want, and even the email addresses are only the same as the registration addresses 60% of the time. 1 hour ago, requinix said: You can pass a custom value to PayPal with the transaction. They will send it back to you in their messages. Use that value as an identifier for the order (which you should be storing), and obviously you know who the user is from the order. That's the issue. Since I render just a one time service, I have only truly cared about the confirmation email I get that someone paid. I've manually linked the payment to the registration. I'm just at a point where I'd like it to automatically link it. I posted the question in the PayPal community, but they have poor avenues for community help. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560052 Share on other sites More sharing options...
Jim R Posted July 25, 2018 Author Share Posted July 25, 2018 I'm mostly just wondering if anyone here has dealt with it directly. From there, I'd ask if I pass what I need via the URL, could I return it back in the Advanced Return section. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560053 Share on other sites More sharing options...
requinix Posted July 25, 2018 Share Posted July 25, 2018 I just told you: pass some identifier, like for the order or the user or whatever else you're using in your database that is related to this transaction, and link the payment that way. I did most of my PayPal work in a previous job, whose code I obviously don't have access to anymore so I couldn't tell you precisely what fields to use. But the principle is there. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560055 Share on other sites More sharing options...
gizmola Posted July 25, 2018 Share Posted July 25, 2018 The IPN/PDT variables are all documented here. payer_id is the variable that is passed around in the initial dance back and forth to get to the actual payment. So long as you store that in your customer record, you will have what requinix is talking about to correlate things inside your IPN listener script when the callback from Paypal occurs. The other option is that you can use a hidden field named 'custom' and stuff whatever you want inside of it. Paypal will pass custom through the process, but in this case, I don't see why you would want to when using the payer_id is core to the entire flow. Quote Link to comment https://forums.phpfreaks.com/topic/307558-passing-variables-to-paypal-then-back-to-my-site/#findComment-1560057 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.