Christopher Bergin Posted August 14, 2013 Share Posted August 14, 2013 The whole Paypal integration is painful. After setting up 1 merchant account and 3 buyer accounts, I can't get Paypal to recognize any of the accounts when a user is redirected after registering. Has anyone else experienced this? Prior to even testing Knowledge Is Power, I make sure that I'm logged into Paypal. Link to comment Share on other sites More sharing options...
Larry Posted August 14, 2013 Share Posted August 14, 2013 Yes, PayPal integration is painful. Even for me, and I'm pretty experienced with PayPal at this time. Are you making sure you're logged into PayPal or into the PayPal Developer Sandbox? Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 15, 2013 Author Share Posted August 15, 2013 yes, a view of my Sandbox accounts are displayed and my name is visible in the top right corner of the page as being actively logged in. https://developer.paypal.com/webapps/developer/applications/accounts. The 'log in to complete your checkout' page is where my problem occurs. I continue to receive an error message. Please check your email address and password and try again The email and passwords I'm entering at this point are valid because I can log into each Sandbox account using them. I'll submit this on the PayPal forum as well. Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 16, 2013 Author Share Posted August 16, 2013 I don't think I'll resolve this issue with PayPal so I went ahead and read the remainder of the chapter. Just a few quick questions... Once the IPN is initiated on the PayPal side, it's my understanding that whatever variables that were sent to PayPal to complete the registration process are returned as $_POST variables for validation. When constructing the $req variable, their inclusion is required, is that correct? When the response variable $res is being assigned a value, does the fgets function read just 1 line of text? Does $fp consist of numerous lines of text that include the values for 'payment_status', 'receiver_email', 'mc_gross' etc? Which leads me to my last question, are the $_POST entries such as 'payment_status' specific to PayPal responses and are not arbitrary? Link to comment Share on other sites More sharing options...
Larry Posted August 20, 2013 Share Posted August 20, 2013 Sorry for the delay; was out of town. Answers inline... Once the IPN is initiated on the PayPal side, it's my understanding that whatever variables that were sent to PayPal to complete the registration process are returned as $_POST variables for validation. When constructing the $req variable, their inclusion is required, is that correct? I can't say with absolute certainty that that's the case, but I believe so. Basically you send the data to PayPal to confirm that data was just sent to you (and not coming from some third party). When the response variable $res is being assigned a value, does the fgets function read just 1 line of text? Does $fp consist of numerous lines of text that include the values for 'payment_status', 'receiver_email', 'mc_gross' etc? Let me double-check the code before I answer this one. Which leads me to my last question, are the $_POST entries such as 'payment_status' specific to PayPal responses and are not arbitrary? Yes, correct. You can see that for yourself in PayPal's 5,000 pages of documentation. Link to comment Share on other sites More sharing options...
Christopher Bergin Posted September 21, 2013 Author Share Posted September 21, 2013 It appears that my problem with PayPal is with the generated code for the subscribe button. The form action is directed to the Production site. <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> Manually changing the code to read <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> doesn't effect the desired results. I would probably need to go through the process of creating the accounts again from the beginning, if I'm so enthused. Thanks for the help just the same. Link to comment Share on other sites More sharing options...
Recommended Posts