Store Issues {Help Please}

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/10/2012 6:28:39 PM
Gravatar
Total Posts 15

Store Issues {Help Please}

Hey Joe,

I had the store completely setup... and then wondered how to get people to pay. Well I started searching through the documentation and found how to configure the the payment methods. As of now I only have them in the web.config file, however, I plan on moving them to the user.config file for updating purpose only. Anyways.. i configured the google sandbox and the google checkout using the directions. My website has a AES_128Bit_CBC with Shai1 for message auth and RSA as the key exchange, so the site should mee the ssl requirement. 

Anyways, So once configured, I go to the store ( I test in Sandbox and regular) and when i click pay by google checkout, It loads and error page of some sort. Doesnt really specify the error just says its been logged. When I go the the Admin panel and check the Errors, I get somethign like this: 

"2012-03-09 23:42:35,076 INFO 2012-03-09 23:42:35,107 ERROR 2012-03-09 23:44:50,221 INFO 2012-03-09 23:45:03,971 INFO 2012-"

Any suggestions for both the google checkout error and the error not really specifying in thelog?

 

Next, when I got an error with google, I tried creating the paypal checkout. I did both sandbox experience and regular experience. When doing sandbox, I could get it to reply back to the website using the PDT or the notification thing. I double checked the link and I have it correctly addressed to the right folder. 

So when I make the payment and click back to website, the payment transaction is never complete on teh website, however it shows complete on my paypal account. Any Suggestions here?

 

Thanks in advance!!!

Tyler

3/10/2012 6:31:26 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

System Information
mojoPortal Version 2.3.8.1 MSSQL
Operating System Microsoft Windows NT 6.1.7601 Service Pack 1
ASP.NET Info Running in Partial Trust

 

This is a shared hosting through 1 and 1

3/11/2012 8:34:56 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Hi,

It looks like the errors are being truncated so you can't see the detail in the log, not sure what is causing that. You might try enabling database logging instead of the default text file logging and see if that provides any error detail. See also Basic Troubleshooting, it is possible to disable the friendly error page temprarily to make it show the actual error details.

Note that the ones that say INFO are not errors, only the ones that say ERROR. But without the actual error details its not possible to know what is happening.

Historically 1and1 has never been known to me to be any good for shared hosting though they are excellent for dedicated servers. You left out the .NET version information when providing your system information which seems a little fishy to me since I know the problem with 1and1 shared hosting in the past was that they never had the latest .NET frameworks available.

Hope that helps,

Joe

3/11/2012 9:17:02 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

I'm pretty sure its the .net 3.5 package. I've called and called about the trying to move to a 4.0 framework package. I dont know of they did. anyways I've made sure i d/l the 3.5 package from the source code and upload to my webserver. Btw I totally agree 1and1 is not the best on shared. Anyways, when turning off the customErrors, i basically get an error that says hey go turn them back on. I'll try the db logging. This one might actually work and record the error. I'll let you know. wont take long to patch that up. Hopefully, it will show something. I'm also gonna try the 4.0 package on this and i also might try a fresh install of 3.5 install.

 

Tyler

3/11/2012 9:46:01 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey Joe,

So I think something more is going on with the system itself. Ive patched up the log4net, user, and web configs to do the system logging instead of file and even disabled the remote errors to show only the asp... and then re enabled, but when I go to the Administration section the system log area is still blank.. Am i doing something wrong here?

 

Tyler

3/11/2012 9:58:12 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Are you sure you made the correct changes to the log4net.config file as well as adding the needed setting in user.config as indicated in the article?

Note that changes to user.config are not automatically detected so you have to touch web.config after editing user.config.

Then of course errors will only be logged when errors happen but you should see at least some info logging for application start event after touching web.config

I think you misunderstand the customerrors element in Web.config

RemoteIOnly means it will show the friendly error page for remote requests and only show the error details when browsing locally ie using localhost as the url. To make it always show the error detail you need to set it mode="Off"

Hope that helps,

Joe

3/11/2012 10:27:16 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

So obviously before pasting this i'm only pasting the changes made not the full document for security reasons. 

user.config : http://pastebin.com/7GvnSsu7

web.config : http://pastebin.com/PmRExf7v - this is the db log file

log4net file: http://pastebin.com/Z1XnH6iW

 

As for the customErrors, I have tried everything in every possible way.

to disable it, i commented out yours and added the following code: 

<customErrors mode = "off" />

but still for some reason, there is no logging of the error whatsoever still.. I honestly have no clue what's going on 

3/11/2012 10:39:21 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

previously you said:

when turning off the customErrors, i basically get an error that says hey go turn them back on.

That makes me think you made a mistake which caused it to fail to load the web.config file. Most likely you are making mistakes commenting things out. With <customErrors mode="Off" /> the site should still work and any error should result in details being shown. If that is not happening and the site does not load after your changes you are doing something wrong, most likely, making a mistake with the comment syntax, so instead of commenting anything out just change the setting.

Hope that helps,

Joe

3/11/2012 11:05:52 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

well I deleted it all togather and I think i found the issue. I think its something with 1and1. I think they have their own logs that will somehow disable the other logs. not entirely sure, but I found logs in the root folder of my site. and I see errors, but its just mishmash. 

 

I'm gonna try an install of the 4.0 system. and see if that works. 

3/11/2012 11:13:18 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Unless you have a place in your control panel where you can specify a .NET 4 app pool that is not going to work to installl the .NET 4 package of mojoPortal.

I don't see how they could prevent logging that is internal to mojoPortal code. But logging aside you should be able to get the error detail by setting custom error off.

You mentioned you are using source code, the problem could be related to how you are producing and deploying a build. Why not start with deleting all the files and deploy the offical release package of mojoPortal 2.3.8.1 for .NET 3.5.

3/11/2012 4:01:44 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

So I think i may have found the issue for the Gcheckout. I dont think i fully configured the site to run off ssl. I only changed the cookie's and something else. So once I start a fresh install of .net 3.5 i'll fully integrate it this time. 

 

Now for the notifications to return back to the server.. have any reason why that wouldn't be returning back to the server? 

I originally setup paypal sandbox and got it working fully. Its really not that hard in sandbox. instead of using a Preconfigured one, you would setup one yourself. Next I made sure the auto on was obviously set to on. and changed the other things needed for the paypal configuration. Only thing is in sandbox, you'll never get the IPT to work cause the payment never follows through, so on the tab there is an IPT function.. This is where i stopped and actually opened up my site for complete testion and made a $1 transaction and paid for it out of my account. Only thing is.. when i paid and redirected back to my website.. the data was incomplete under the ecommerce section. there was no data. You have any idea what might be causing that?

3/12/2012 8:02:55 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Google checkout will only post back to your server using a secure connection with a valid SSL certificate from a valid trust authority.

Once you have a valid SSL certificate installed you can configure their notification in your google account settings as shown in the article Using Google Checkout.

I don't know why you are having troubles with PayPal, for me both PDT and IPN work in production and in the sandbox and it sends back customer information. Though the sandbox is tricky to work with sometimes. Make sure you read Using PayPal Standard very carefully and follow all the steps to setup both PDT and IPN.

Hope that helps,

Joe

3/12/2012 8:46:47 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey Joe,

I'm just switching my hosting provider. 1and1 is the worst hoster i've ever seen. I've switched to arvixe. And support wise, they are far better than 1and1. Really prompt. So now i just have to wait for them to add my ssl to my site. cant wait!!! :) i'll keep you informed. but I switched to the 4.0 framework. Overall, it seems faster(hoster wise) as soon as a db is created, its there. on 1 and 1 i had to wait like 30 minutes. 

3/12/2012 7:27:10 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey Joe,

So i'm updating you on the situation. Not entirely sure whats going on. I have changed hosting provider to avrixe and upgrade my site to .net 4.0 

I quadruple checked everything thing with the payment settings, however, It still does not store anything on my website. I have properly configured sandbox with the IPD and the IPN. 

Any Suggestions?

Tyler Yokley

 

Edit: I now have a log from it so this is a plus I can now show and kinda see whats going on. I deleted out part of the email on purpose on here.

<code>

2012-03-12 16:56:10,769 ERROR 173.0.82.126 - en-US - /Services/PayPalIPNHandler.aspx - mojoPortal.Web.Services.PayPalIPNHandler - mc_gross=25.00&protection_eligibility=Ineligible&address_status=confirmed&item_number1=6f90e558-e4b3-4798-8f4c-27cb2fa71d68&payer_id=DMG2JJG23Z7U6&tax=0.00&address_street=1+Main+St&payment_date=16%3A56%3A04+Mar+12%2C+2012+PDT&payment_status=Pending&charset=windows-1252&address_zip=95131&mc_shipping=0.00&mc_handling=0.00&first_name=Ty&address_country_code=US&address_name=Ty+Yokley&notify_version=3.4&custom=298440de-056c-4c33-bed9-42f89989500a&payer_status=verified&business=ctyokley%4.net&address_country=United+States&num_cart_items=1&mc_handling1=0.00&address_city=San+Jose&verify_sign=Aoxgr1j4uG85Y.bMs44rnTil8K7CAAX4-JBhi1zmqy2UEsjijR7U5GAh&payer_email=ctyokl_1331409585_per%st.net&mc_shipping1=0.00&tax1=0.00&txn_id=3WB364711E380144S&payment_type=echeck&last_name=Yokley&address_state=CA&item_name1=HTC+Thunderbolt&receiver_email=ctyokley%40comcast.net&quantity1=1&pending_reason=unilateral&txn_type=cart&mc_gross_1=25.00&mc_currency=USD&residence_country=US&test_ipn=1&transaction_subject=298440de-056c-4c33-bed9-42f89989500a&payment_gross=25.00&ipn_track_id=96b8a84a3110
System.NullReferenceException: Object reference not set to an instance of an object.
at WebStore.Helpers.WebStorePayPalIPNHandlerProvider.HandleRequest(String transactionId, NameValueCollection form, PayPalLog standardCheckoutLog)
at mojoPortal.Web.Services.PayPalIPNHandler.HandleRequest()
2012-03-12 17:11:22,854 ERROR 173.0.82.126 - en-US - /Services/PayPalIPNHandler.aspx - mojoPortal.Web.Services.PayPalIPNHandler - mc_gross=25.00&protection_eligibility=Ineligible&address_status=confirmed&item_number1=6f90e558-e4b3-4798-8f4c-27cb2fa71d68&payer_id=DMG2JJG23Z7U6&tax=0.00&address_street=1+Main+St&payment_date=17%3A11%3A17+Mar+12%2C+2012+PDT&payment_status=Pending&charset=windows-1252&address_zip=95131&mc_shipping=0.00&mc_handling=0.00&first_name=Ty&address_country_code=US&address_name=Ty+Yokley&notify_version=3.4&custom=47123fc3-7d21-4f6a-b4b5-6ff33fe1daca&payer_status=verified&business=ctyokley%40net&address_country=United+States&num_cart_items=1&mc_handling1=0.00&address_city=San+Jose&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AY1DBrlrMQhjfDpKk4BqZgaiiegZ&payer_email=ctyokl_1331409585_per%40comcast.net&mc_shipping1=0.00&tax1=0.00&txn_id=3U996457G36459219&payment_type=instant&last_name=Yokley&address_state=CA&item_name1=HTC+Thunderbolt&receiver_email=ctyokley%t.net&quantity1=1&pending_reason=unilateral&txn_type=cart&mc_gross_1=25.00&mc_currency=USD&residence_country=US&test_ipn=1&transaction_subject=47123fc3-7d21-4f6a-b4b5-6ff33fe1daca&payment_gross=25.00&ipn_track_id=93e844d7ad677
System.NullReferenceException: Object reference not set to an instance of an object.
at WebStore.Helpers.WebStorePayPalIPNHandlerProvider.HandleRequest(String transactionId, NameValueCollection form, PayPalLog standardCheckoutLog)
at mojoPortal.Web.Services.PayPalIPNHandler.HandleRequest()
2012-03-12 17:19:42,803 ERROR 173.0.82.126 - en-US - /Services/PayPalIPNHandler.aspx - mojoPortal.Web.Services.PayPalIPNHandler - mc_gross=50.00&protection_eligibility=Ineligible&address_status=confirmed&item_number1=6f90e558-e4b3-4798-8f4c-27cb2fa71d68&payer_id=DMG2JJG23Z7U6&tax=0.00&address_street=1+Main+St&payment_date=17%3A19%3A36+Mar+12%2C+2012+PDT&payment_status=Pending&charset=windows-1252&address_zip=95131&mc_shipping=0.00&mc_handling=0.00&first_name=Ty&address_country_code=US&address_name=Ty+Yokley&notify_version=3.4&custom=007f1e71-d6d4-484b-9efc-1e4f1adca32e&payer_status=verified&business=ctyokley%40.net&address_country=United+States&num_cart_items=1&mc_handling1=0.00&address_city=San+Jose&verify_sign=AQU0e5vuZCvSg-XJploSa.sGUDlpA8CUV0VFqLD-82CskH5dMp52M6wW&payer_email=ctyokl_1331409585_per%40comcast.net&mc_shipping1=0.00&tax1=0.00&txn_id=4DU26864ML3358103&payment_type=instant&last_name=Yokley&address_state=CA&item_name1=HTC+Thunderbolt&receiver_email=ctyokley%40.net&quantity1=2&pending_reason=unilateral&txn_type=cart&mc_gross_1=50.00&mc_currency=USD&residence_country=US&test_ipn=1&transaction_subject=007f1e71-d6d4-484b-9efc-1e4f1adca32e&payment_gross=50.00&ipn_track_id=108633df2ea30
System.NullReferenceException: Object reference not set to an instance of an object.
at WebStore.Helpers.WebStorePayPalIPNHandlerProvider.HandleRequest(String transactionId, NameValueCollection form, PayPalLog standardCheckoutLog)
at mojoPortal.Web.Services.PayPalIPNHandler.HandleRequest()

</code>

3/13/2012 7:43:41 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Hi,

Without seeing the full data from paypal it is difficult to know exactly what is null. I know that about 7 weeks ago I fixed a bug in the webstore ipnhandler to prevent a null reference exception if the mc_shipping param was missing in the post.

ie the original code was like this:

payPalShipping = form["mc_shipping"].ToString();

but someone reported an error happening there because the form variable was not present so the code was changed like this:

if (form["mc_shipping"] != null)
{
payPalShipping = form["mc_shipping"].ToString();
}

the strange thing was that I never had this exception occuring on my site and I do most of my business through paypal.

from what you posted it looks like mc_shipping is being posted so it isn't clear to me which param is missing, but all I can guess is there is one missing that we are expecting and not checking for null so this error is happening.

I know that in my paypal settings I have it configured to require a phone number, possibly that setting makes it post more things and would explain why the error never happens on my site, but I'm only guessing.

Hope that helps,

Joe

3/13/2012 8:58:33 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey Joe,

Just wondering which parameters are needed? I went through and made sure my telephone number is posting. I'm still gettin an error with that.

 Edit:

Where is all the.cs code stored?? I was trying to find it and i have the .aspx. and generally the code should be in the same folder, but I even searched the root folder and could not find it.

Tyler

3/13/2012 9:16:04 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Hi Tyler,

The error is potentially any form variable that we are not checking for null on before accessing it

You can view the source of the WebStore IPN handler here.

If working with the source code you could set a breakpoint in WebStore.UI/Helpers/WebStorePayPalIPNHandler.cs and find out exactly what is null.

I can add checks around all of them that we don't currently check but that will only solve it after the next release.

I wasn't suggesting the phone was missing, what I was suggesting is that the setting to require it may also make other things get posted that are not being posted and therefore causing the error.

I'm just guessing that there must be some difference in your paypal account settings since I don't get any errors on my site and most of my orders come through paypal and I've been using it a long time. So something about my settings is ensuring that everything is posted and no null exceptions are happening.

Hope that helps,

Joe

3/13/2012 9:34:37 AM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

hey joe,

So, How does this cs file load from my site? When I go the the paypal handler, obviously i see the includes at the top and it includes the aspx.cs file. but if i was wanting to edit live. where is that cs file stored? That's what i was asking :)

 

Thanks,

Tyler

3/13/2012 9:59:14 AM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

All the C# code is compiled into dlls in the /bin folder in deployment packages, we don't deploy source code to the server. To step through the code your would have to have the source code running on your dev machine using Visaul Studio 2010 and it would have to have a public host name mapped to the ip of your router and the router mapping it to your dev box IIS, otherwise paypal cannot post to your dev box. This is how I do it. I turn off the mapping in my router when I'm not using it for testing so that no public traffic is coming to my dev box when I don't want it to.

Various ecommerce features like WebStore, Event Calendar Pro, Web Invoice Pro all use the same url for PayPal PDT and IPN and that handler url looks up the the paypal log by a guid that we pass to paypal and paypal passes it back to us in the post to the pdt and ipn handlers.

Using that guid we lookup the paypal log and it has a record of which handler provider to invoke so it knows it is for WebStore and it calls the handler provider for web store which then does the processing. Each ecommerce feature has its own handlers and the name of the handler is stored in the paypal log by each feature that uses the paypal log.

Note that this architecture is also part of security for ecommenrce. Consider that when someone adds an item to the cart and then they click the paypal button they leave your site, you don't really know if they will complete the order or come back at all. But imagine they use 2 web browsers and immediately after they go to paypal with the first web browser they add more products to the cart, then they pay for one item but might manage to get more items for a cheap price if we just blindly trusted the cart. But we don't. We actually serialize the cart and store it in the paypal log so that whatever log they had when they went to paypal in the first browser would not be the same log after they add items to the cart in the second browser. And paypal is going to pass the same log guid back to us that the user had when he left our site in the first browser and we re-populate the cart exactly as it was before he went to paypal based on the serialized version of it we have in the paypal log. This way we can ensure that no manipulation can allow the user to get more than what he paid for.

Hope that helps,

Joe

3/13/2012 2:17:50 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey joe, 

Do you charge tax for in store items?

 Edit:

By the looks the following parameters are being passed.

Shipping,currency, pending reason, reason code, payment type, payment amound, address(including city, state, zip, and country, phone number, the business name, and if the customer put a memo. 

 

I'm not entirely sure if this is the reason.. but have you thought about setting the variable to empty b4 this code is fired up? I'm gonna try the ipn with a tax and see if that corrects the problem. By the looks of it, that is the only thing i'm not charging for.

Tyler

3/13/2012 2:27:10 PM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

The general rule is you must collect state sales tax for any state in which you have a business presence. Therefore I collect tax for orders where the customer address is in NC because I have a business presence in NC. You can configure PayPal and Google to collect tax for you based on the state, you must tell them the tax percentage which can often be a little tricky to find out and typically may vary by county. like here in NC there is a base tax rate for the state but counties also charge tax so I had to find out the tax rate for the county where I operate and use that in my google and PayPal settings.

Note that google and paypal only collect the tax based on the settings you provide, they don't pay the tax or forward it to the states so it is up to you to find out how to report it/pay it to your state/county.

Hope that helps,

Joe

3/13/2012 2:33:22 PM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

fyi, I've added checks for null on all the ipn parameters. If you get the latest changes from the source code repository and apply them to your working copy using HG > Update then rebuild the solution you should have the fix.

So this will be fixed in the next release of mojoPortal but for those who are able to build and deploy their own build from the latest source code the fix is available right now in the repository.

3/13/2012 2:38:28 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Lol i was just looking at the source code : http://mojoportal.codeplex.com/SourceControl/changeset/changes/f6b4b6babc89 

so i'm a lil' new on asp.net deployment. how am i able to build it? I can get a copy of 2010 thru dreamspark. but i'm not entirely sure how to compile it and reupdate it.

any suggestions?

Nvm. I thin ki understood what you ment. by using Tortoise HG durr i'm a dummy! :) Thanks! Let ya know how it turns out.

3/13/2012 2:56:58 PM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Making and deploying your own build is not that difficult for an experienced develooper but may be challenging if you have no background in asp.net

Steps I use to package a build are covered in the article Packaging and Deployment

I deploy to a local folder then remove some junk before deploying to production, make sure you read the whole article very carefully. 

3/13/2012 5:19:53 PM
Gravatar
Total Posts 18439

Re: Store Issues {Help Please}

Hi Tyler,

To make it simple, if you just install the latest mojoPortal 2.3.8.1, I can backport this fix to that release and I'll just send you a fixed WebStore.UI.dll and you can drop it in the /bin folder and confirm the fix.

Best,

Joe

 

3/13/2012 7:19:29 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Nah its fine. I like the learning experience! If i cant get it to work after that, then I might take yo uup on the dll file :P

3/13/2012 9:04:37 PM
Gravatar
Total Posts 15

Re: Store Issues {Help Please}

Hey Joe,

Just letting you know that fixed the issue! It had to be the tax not passing back and forth. I wasnt charing tax just for dev. purpose only.

Also, I found it super easy to build and upload the files. just followed the instructions and got it to work right away.

Thanks for all you do!

Tyler

You must sign in to post in the forums. This thread is closed to new posts.