Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Christopher Bergin

Chapter6/Example1

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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. ;)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...