Almost have Simple Commerce running perfectly except that it does not ping our website so that purchases show up in our back end, and I’ve attempted to go through some of the strategies used to isolate the problem. We are a store in Canada, and as far as I can tell from the PayPal documentation, we should be able to use all the IPN features of PayPal.
Like others have experienced, both buyer and seller get the PayPal notifications just fine. It’s just that it would be nice to have the purchases show up in the back end and be able to deliver thank-you emails from our store, too.
What I have been doing however, instead of using the Developer Sandbox, is using PayPal live (just lowering the prices to pennies and purchasing the items for myself) because other than the minor cost involved of ‘buying’ from myself it seems like more of a real world test to use the actual PayPal. So, I’ve bypassed the Sandbox but have done these other things:
- entered the IPN URL in PayPal and enabled Integrated Payments on PayPal.
- we were using our own forms to submit the individual cart items to PayPal. Because we needed three options, we included a modified way of submitting the title of the item. So, I backed down to Simple Commerce’s sample transaction forms, that use just the basic purchase tag, as described in the documentation here.
- checked the EE database with phpMyAdmin in the exp_simple_commerce_purchases table. No entries are being made.
- as described in someone else’s troubleshooting, added PHP code so as to output the transaction data and PayPal’s response and email it to me when a transaction happens, by adding this code that Derek wrote:
- we were using a rewrite method to remove the index.php from our site. Tried going without that (just to make sure nothing funny was happening to the IPN URL back on our end), but it makes no difference.
- The buyer email address I’m using is different than the seller email address.
- Finally, we’re also hosted on pMachineHosting, and I would assume that there wouldn’t be problems receiving pings from PayPal on the server.
OK. Soooo.. does anyone know of anything else I can try? Can the Sandbox tell me anything that live PayPal can’t?
Hi, O. Smith, I’ve moved this to the technical support forum for you - the Modules forum is really intended for third-party items, and Simple Commerce is a first-party module. =)
Well the Sandbox environment uses the same services as the live PayPal does, so you aren’t benefitting yourself by using those versus the testing environment. Let’s start off though with making sure you are current. What version and build of ExpressionEngine are you using?
Sorry that took awhile to reply Derek. Yes, that is indeed the case - logged in members only (in fact, we’ve restricted purchasing to logged in members).
BTW thanks for moving the thread to the proper forum Lisa. I’d seen the other thread regarding this in the module discussion and that seemed funny, but… =)
What I would do at this point is step back—go into debug mode, setup and complete verification of accounts in the sandbox, and use a template just with the SC module’s tags, removing any of your own modifications and special cases. Don’t use any encryption or any advanced options—just a vanilla PayPal Sandbox transaction with a normal setup. Reducing any of these variables will help you to isolate what to look at, so you’re not chasing needles in the proverbial haystack.
And please make sure that your Simple Commerce files are current, and from the latest build that you are running, just in case they did not get overwritten during your update.
And please make sure that your Simple Commerce files are current, and from the latest build that you are running, just in case they did not get overwritten during your update.
OK, freshest of the fresh. Downloaded a fresh zip archive, unpacked, deleted simple commerce on that side, saved a backup on this side, uploaded a new copy of the module.
What I would do at this point is step back—go into debug mode, setup and complete verification of accounts in the sandbox, and use a template just with the SC module’s tags, removing any of your own modifications and special cases.
Don’t use any encryption or any advanced options—just a vanilla PayPal Sandbox transaction with a normal setup. Reducing any of these variables will help you to isolate what to look at, so you’re not chasing needles in the proverbial haystack.
All done. The “PayPal account” variable is set to my ‘main’ sandbox account (the one in which I have set up the others).
I haven’t turned on encryption to begin with (I was wondering if this was needed to make it even work?) Do I need to use the ‘test certificates’ to even make things go? I have to admit, the sandbox is TOTALLY confusing to me!
1) Though I appear to be registered/verified as a seller, and the fake “buyer” which is a fake verified “premier” merchant account goes to buy, in the cart it reads “Seller Status - This recipient is not yet registered. PayPal will send an email to the recipient explaining how to complete your transaction.”
2) All accounts have an account balance of zero, because I couldn’t get PayPal Sandbox to add funds to them anyway. (When I tried to get ‘verified’ as a regular user, Sandbox puts regular fake credit card info in there, but I seem to need to put real bank account info there. I’m just assuming its not necessary to really ‘add funds’ to get things working.
Everything “works” - the Sandbox reports the emails that it would send to my test buyers - except that nothing appears in purchases.
Here is the entirety of the page I do the new bare-bones purchase from:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
Anyway, after all this: I get the regular PayPal emails in the sandbox account. Account activity also shows for the fake buyers. But “No Purchases” still appears behind the “Edit Purchases” link in the Simple Commerce module. No emails arrive from Simple Commerce, either. :(
Their sandbox is indeed confusing, but you will need to complete the verification for both merchant and seller with bank accounts. There are instructions in the help files on the sandbox site to walk you through it, but if memory serves, you can put any junk data you want in there. But it won’t even send out IPNs unless both merchant and seller are verified, authenticated, etc.
OK, here’s what I don’t get. I set up the Sandbox account (as in me, the seller, the account identified in the Simple Commerce module control panel by address). So that’s the ‘seller’ account, and the other account I set up within my Sandbox account are the fake ‘buyers’, right? But no ‘verification’ of any kind is needed for the ‘seller’ account, right?
It’s only the fake “buyers” that go through the fake verification process, right? I have three, a premier, a business, and a personal account. I can get the first two ‘verified’ but not the third. It rejects my fake bank info. Here, I’ll try again…
You need to set up both fake merchants and fake buyers (not sellers, whoops, thanks, Pie Man) in your Sandbox. And yes, both will need to be verified, authenticated, backed by a fake credit card, bank account, etc. Again, I don’t remember off the top of my head what it is expecting for the bank info, but it’s all there in PayPal’s sandbox support documentation, and they do all need to be verified and whatnot. It’s definitely a hassle to set up, but once it is and completed, it’s rather handy. Each account’s emails are sent to the sandbox email section, so make sure you read and act on all of those as well.
Sorry to barge in here, but do they both have to be completely verified JUST for the Sandbox, or Live as well?
I’m just trying to undertstand how this will work if a member who isn’t completely verified or chooses to skip the paypal process and just does the credit card transaction, how the purchase history will work for that then?
Well, I can’t use my regular “personal” account buyer, I guess. I get stopped for having ‘invalid’ info for the bank and transit number when I try to put in any old 3-digit number for Institution # and any old 5-digit number in the Bank Transit info.
Just want to make sure we’re talking about the same things:
The seller account is: —the account that I log into the whole developer area with —the email address I put into the Simple Commerce preferences panel
The buyers —the accounts that are present when you click the “sandbox” tab once you are logged into the Developer area.
I have a premier account, a business account, and a personal account. I seem to think ALL of these are buyers. Derek, are you saying one is supposed to be a seller? Honestly, I’m reading the documentation.. what I understand from the docs is that the main account (that creates the sandbox fake accounts) is the seller.
But if that’s NOT the case, and the premier account I set up is the “seller”, then should I be adding THAT address to the Simple Commerce module? Hmm.. testing testing…
Oxygen Smith: Yes, one of those sandbox accounts is supposed to be your seller, and the email address you put in your Simple Commerce panel.
Pie Man: Yes, IPN only works with verified PayPal members. These are really PayPal questions, and available at their Help center, so it’s always best to check there first to make sure you have the most current policy information. From their Help section:
IPN works for all PayPal payments received from other PayPal members; however, it does not post notifications for other payments received such as Money Market dividends, Merchant Referral Bonuses, and so on.
Yes Derek, thank you. THAT worked - now that I understand who the “seller” is supposed to be (the fake account you set up WITHIN your sandbox login account) and that you plug THAT fake account address into the Simple Commerce page. Gotcha. Thank you again. Whew.
So. I tried both the “buy now” and “add to cart” buttons, and voila, now I get the appearance of the item behind the Purchases link in the Simple Commerce settings panel, and I get mailed the appropriate admin notification email from Simple Commerce (that somebody purchased something). I assume that if the customer was real she’d get a notification/thank you email, she’d get one too.
I also plugged the rewrite back in (the one in .htaccess that gets rid of index.php) so I know it isn’t that.
Quick question: if someone orders an item in a quantity of 50, is it really supposed to appear as 50 separate entries in the “Edit Purchases” section? Seems a little strange, is all.
Anyway, I’m off to try building things back up again. I’ll probably be able to tell now where the snag is. Talk to you soon then, and thank you one more time for clarifying the Sandbox (I know it’s supposed to be a job for me and Paypal) o_0
No problem, hope you both get everything working. For purchases, yes, each record in the database indicates a single item, so multiple quantity purchases will generate multiple rows in the database.
After studying what I’ve done I realize I’m confused about two major things how the Simple Commerce tag is deployed on the page… or I might have begun with the wrong assumptions. If this could be clarified, this would be a GIANT head start to my debugging. I really got to this point by trial and error - everything displaying on the item detail page and in the PayPal cart after you hit the button was all I was striving for—I just figured everything would work fine after I got these working (what could go wrong now? hahaha.)
One
- If you want to use PayPal’s option fields and the like, it seems that you are required to build your own PayPal forms (borrowing from provided templates). I guess I am a little confused about how form tags interact with the Simple Commerce tag. What I have done previously is nest the order of the tags like this on the item detail page (on my site you can only purchase from the item detail page):
- exp:weblog:entries tag, ——exp:simple_commerce tag inside of weblog:entries, and ————forms for individual buttons inside the exp:simple_commerce tag.
Here’s the example of my item detail page (stripped down and simplified):
{exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="1" disable="pagination|member_data|trackbacks"} {!-- display all the item's fields, custom fields and associated images --} . . {exp:simple_commerce:purchase entry_id="{entry_id}" success="http://www.mysite.com/shipping/index" cancel="orders/cancel"} . . {!-- paypal form button - add to cart --} <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> {!-- paypal hidden fields so that all the options get in there --} <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="add" value="1"> . . . </form>
(Of course, when using the Sandbox, the form action has to be “https://www.sandbox.paypal.com/cgi-bin/webscr” ).
As I have understood it, using the success and cancel parameters in the Simple Commerce tag, this means I can leave out the hidden fields from the Add to Cart button form, <input type=“hidden” name=“return”.. > and <input type=“hidden” name=“cancel_return”.. > Correct?
Two
If you don’t use the simple_commerce tag, but build your own forms—or if you just use forms—do the items get added to the Purchases table in Simple Commerce? I just figured they would but maybe this is a giant assumption on my part.