MicrostockGroup Sponsors

Setting up PayPal

Started by Amanda_K, March 28, 2013, 07:42

Previous topic - Next topic

Is PayPal Working for you?

PayPal IS Working
7 (63.6%)
PayPal is NOT Working
4 (36.4%)

Total Members Voted: 11

Voting closed: April 11, 2013, 22:00

Amanda_K

I am attempting to test purchasing, but I am absolutely stumped by PayPal IPN... my test payments are going through but nothing is happening after that.  Can someone more technical maybe take a peek at the IPN file provided and give us an idea of what needs to be changed/added?  Also what page to put in our PayPal settings as the page it's supposed to be "listening" to? That'd be awesome :)

On another note...I have my PayPal (verified business account) set up to take payments from one of my other sites so all of that site's information is appearing on my checkout page.  I was wondering wear the logo we upload for PayPal comes in and if anyone knows of a good way to set up different branding depending on which site customers check out from?

Leo Blanchette

Welcome to IPN (Instant Payment Notification)! I was wondering when someone would ask about that.

Its easy.

Buyer goes to your cart.
Buyer Pushes "Get Licenses". Array of values are posted to Paypal.
...
Transaction succeeds or fails.
Paypal post back to your IPN listening script (the IPN link in your admin area) what happened.

Your site says "Does payment = cart value?"
If "Yes" Cart is transformed to user files.

User pushes download button and image is resized and delivered on command. (Images are not pre-sized so as to avoid excess space useage and file amounts)

So to answer your question -

Setting up Paypal IPN - Here are the verbal instructions, for lack of time. I will post some tutorials afterward.

Go to paypal-> profile-> selling options-> instant payment notifications (from memory, something like that).
Put in your paypal IPN listening script link from your admin. There are some other options there too.

While your at it, make the "return link" the customer page, so that paypal redirects the customer to their licensing area.

Thats it!


Leo Blanchette

One more thing - notice the sandbox or live paypal options link to either paypal or the paypal dev site. One is for "pretend" transactions, and simply toggle over to live to make it not pretend.

edit - while your at it set yourself up a customer account for testing. Paypal won't let you purchase from yourself. You can also experience the customer process and make sure it all works. You should get a detailed "Thank you for your purchase" email, and "thank you for signing up" email. Let me know if that doesn't happen.

Also as a bonus, customer purchase emails are cc'd to you. Its fun to see your phone's email go off saying "You've got a sale!"

Poncke

https://www.x.com/search/site/ipn

x.com is paypal developers website. Also, the sandbox is renewed, its now developer.paypal.com

Amanda_K

I set up this quick PDF with a couple of screenshots of the PayPal site settings for anyone who wants a visual.  Very easy!  I did a real live sale and got the payment, both emails (one to the customer one CC to me) and was able to download the image as the customer with no problems.  The only missing link is the PayPal site redirecting the customer back to the page.  So two quick questions to clarify:

1) Where do we set the return URL - I don't think setting it up globally in my PayPal account will work because I have other sites that I use PayPal as a payment method.  Does someone more familiar with PayPal know how to customize this on a site by site basis?

2) Should we have to make any manual changes to the paypal_ipn.php or is it good to go with just the interface toggle from live to sandbox?

Poncke

Why does no one ever check x.com? Its the site that answers all questions PayPal

Leo Blanchette

Quote from: 9lives on March 28, 2013, 19:54
I set up this quick PDF with a couple of screenshots of the PayPal site settings for anyone who wants a visual.  Very easy!  I did a real live sale and got the payment, both emails (one to the customer one CC to me) and was able to download the image as the customer with no problems.  The only missing link is the PayPal site redirecting the customer back to the page.  So two quick questions to clarify:

1) Where do we set the return URL - I don't think setting it up globally in my PayPal account will work because I have other sites that I use PayPal as a payment method.  Does someone more familiar with PayPal know how to customize this on a site by site basis?

2) Should we have to make any manual changes to the paypal_ipn.php or is it good to go with just the interface toggle from live to sandbox?

I'm glad to see you had a working paypal transaction! Glad to hear no bugs on this.

Return link - can be set up in the customer area to post. I'll monkey with it some more. I thought setting it up in paypal was sufficient.

You can make changes to IPN, but make sure they are meaningful and that you send them to me so I can include them with next release. Otherwise they will be over-written. Towards the end of the testing phase I'm going to be putting in ton of HOOK functions, which allows you to insert your own code via whatever plugins you write. If anyone wants to develop.

Leo Blanchette

Quote from: Poncke on March 28, 2013, 21:28
Why does no one ever check x.com? Its the site that answers all questions PayPal
That would be great. I tried to keep payment system as simple as possible so nothing breaks. Any questions in paypal should be asked over there for many reasons.

farbled

Hmm, I tried a (new) personal account to do a paypal checkout and I got an error that I suspect has more to do with paypal than the site. Has anyone seen this?



Kerioak~Christine

Without know what information you missed out it is a little difficult to answer that one  :)

x.com - why don't I use it - well, never having heard of it prior to this thread it is a would have been a little difficult.  It is logical when looking for information about paypal to look on the paypal site not on something with a completely different name.   I also gave up on the sandbox - have used one before but it was much more straightforward then. 


I just used real paypal with tiny amounts of money to test site out (paypal worked, getting downloads did not so if anyone has done both I would love to know how you did it.)  I am using version 6

farbled

Partially figured out. It has to do with the new currencies in the newest theme. I backed up to the previous version and it works a-ok now. Now to figure out where the download link is after I purchase..... :)

Leo Blanchette

Test paypal out rigorously. We don't want bugs in that. Sunday was my last day for bug updates. First make sure there is def a problem and I will do one last fix tonight.

farbled

I tired in Chrome, Mozilla and ie and got the error. However when I restored to the previous version it went away. Not sure why, but it could be my own fault messing with things. Lastly, I don't know how to enable the image license link so that customers can download the purchased image. In the backend the license url disappears when I click save.

Leo Blanchette

Ok, please keep focusing bug reports on anything to do with paypal. That way when I get home tonight I can definitely get you running properly. It would appear this is the final little quirk (serious one anyway) so thanks.

You guinea pigs should be wearing graduation caps soon. WHich one of you gifted photographers/illustrators wants to make an pic of a guinea pig with a graduation cap? :D

Leo Blanchette

For tonight detour to bug stomping thread - http://www.microstockgroup.com/symbiostock-technical-support/symbiostock-test-build-the-bug-stomping-thread!/msg307483/?topicseen#new

Let this thread sink. After sunday MSG should have their forum back from the Symbiostock Guinea Pig Invasion. I've just coined that term. Think it will take?

Leo Blanchette

[snip] sorry wrong thread.

Travelling-light

After a bit of a struggle I now have Paypal working in the sandbox and download is working.

For others still having problems, these are the things that tripped me up:

1. Leo's auto-generated IPN process address is not quite right if you're using the child theme.
I got http://photo.travelling-light.net/wp-content/themes/symbiostock-child/ipn/paypal_ipn.php and I think you need to get rid of the -child.

2. That address has to go into the profile of the virtual business account in the sandbox, not just your real one, and you get into that by logging into the front door of Paypal with your virtual username and password.

Having sorted that, when I returned to my site from Paypal, the shopping cart had changed and there was a download link under the thumbnail. I got my copy of the customer email. The actual customer email bounced because I had used a nonsense address for it.

Hope that helps somebody.

farbled

#17
Thanks! I've changed it in Paypal but for some reason it won't let me change it in the Symbiostock settings. It changes back to -child when I hit save. I'll disable the child theme and see if that works.

-edit, no dice. I'll keep trying...

Travelling-light

Quote from: farbled on March 31, 2013, 21:39
Thanks! I've changed it in Paypal but for some reason it won't let me change it in the Symbiostock settings. It changes back to -child when I hit save. I'll disable the child theme and see if that works.

-edit, no dice. I'll keep trying...

It doesn't matter what it says in the Symbiostock settings, it's just a FYI, generated automatically. As long as it's correct in Paypal you're in business.

farbled

Ok, I changed it in paypal, but still no download link or thank you email. Hmmm. I'm stumped.

Leo Blanchette

#20
Quote from: Travelling-light on March 31, 2013, 21:16
After a bit of a struggle I now have Paypal working in the sandbox and download is working.

For others still having problems, these are the things that tripped me up:

1. Leo's auto-generated IPN process address is not quite right if you're using the child theme.
I got http://photo.travelling-light.net/wp-content/themes/symbiostock-child/ipn/paypal_ipn.php and I think you need to get rid of the -child.

2. That address has to go into the profile of the virtual business account in the sandbox, not just your real one, and you get into that by logging into the front door of Paypal with your virtual username and password.

Having sorted that, when I returned to my site from Paypal, the shopping cart had changed and there was a download link under the thumbnail. I got my copy of the customer email. The actual customer email bounced because I had used a nonsense address for it.

Hope that helps somebody.

* * * YOU ROCK * * *
I would have NEVER solved that so quickly, because I had NO idea the child theme would do something like that. Why would the child theme do that?!?!?! I guess I have plenty to learn too. YES - I will fix that tonight.

Leo Blanchette

[whups please delete]

ruchos

I was having trouble after upgrading to the latest version, with the sale going through, but not triggering once it got back to the customer area. I tracked it down to fixing the following:

In ipn/paypal_ipn.php line 34, it reads:

//sandbox url...uncomment for testing
$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
//$ch = curl_init('https://www.paypal.com/cgi-bin/webscr');


it should be (for real sales, not when sandbox testing):

//sandbox url...uncomment for testing
//$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
$ch = curl_init('https://www.paypal.com/cgi-bin/webscr');


Now it is working beautifully.

farbled

Quote from: ruchos on April 01, 2013, 12:40
I was having trouble after upgrading to the latest version, with the sale going through, but not triggering once it got back to the customer area. I tracked it down to fixing the following:

In ipn/paypal_ipn.php line 34, it reads:

//sandbox url...uncomment for testing
$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
//$ch = curl_init('https://www.paypal.com/cgi-bin/webscr');


it should be (for real sales, not when sandbox testing):

//sandbox url...uncomment for testing
//$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');
$ch = curl_init('https://www.paypal.com/cgi-bin/webscr');


Now it is working beautifully.

Sigh, looks like I'm the odd one out. I'm doing live sales testing and I still cannot get the download link to appear. The latest version still won't let me complete a sale so I'm 2 versions back which works fine except for the download link and thank you email. I made the change above, but no dice. I'm a little frustrated because it's the very last peice I need and then I can concentrate on uploading and maybe even selling some to real customers. :) Any other suggestions?

Kerioak~Christine

Try re-downloading and reinstalling in case something else got scrambled in transit ?