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/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

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