WebStore: Order Confirmation Template and Screen

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.
6/23/2009 8:52:08 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: WebStore: Wrong Order Owner / Wrong Order Total Amount

Hi Joe,
after you could not reproduce the issues on your demo site, I made further tests.

I can confirm that:

1) Not all orders are assigned to the correct user

After the payment on PayPal, the buyer clicks the button to return to the Merchant site.
At this point, sometimes, I get a permission error from mojoPortal.
Apparently this happens because the order is not assigned to the correct site user therefore the buyer can't access the order detail.
Order is assigned to "admin xxx@xxxxxx.xx " (the administrator site user I used before logging out and and logging in again with the buyer user yyy@yyyyyyy.yy ).
Is this something related to the inheritance of wrong browser session parameters ?

2) Transactions are miscalculated by multiplying by 100 the order amount (on PayPal account the amount is correct)

This error is systematic.
Could it be anything due to the mojoPortal-PayPal (Standard) interface/handler which does not convert correctly punctuation required from EUR currency and/or local culture ?

Here follows the "wrong order" hystory, resuming in one order the two errors (underlined):

Web Store > Gestione Negozio > Storico Ordini
Utente Sito admin EffectiveWeb xxx@xxxxxx.xx                      <----- (expected buyer user is yyy)
ID Ordine 42220f8b-b76d-4811-baee-e4dbdf603ca8
Stato Ordine
Nome Cliente yyy
<…>
Indirizzo Email yyy@yyyyyyy.yy
Codici Sconto
Dati Personalizzati
Articoli
EffectiveWeb Hosting – Servizi di Web Hosting presso Effective
Totale 42.000,00 €                                                                       <----- (expected amount is 420,00 €)
Metodo Pagamento: PayPal
 

Registro PayPal
Tipo Richiesta Tipo Pagamento Stato Pagamento ID Transazione Totale Carrello Imposte/Tasse Totale Commissioni Saldo Creato UTC

StandardCheckout 420,0000 0,0000 0,0000 0,0000 0,0000 23/06/2009 12.44.49
IPN cart Pending 6RA687627P057080K 42000,0000 0,0000 1463,0000 0,0000 40537,0000 23/06/2009 12.49.30
PDT cart Pending 6RA687627P057080K 420,0000 0,0000 42000,0000 1463,0000 40537,0000 23/06/2009 12.49.50
IPN cart Completed 6RA687627P057080K 42000,0000 0,0000 1463,0000 0,0000 40537,0000 23/06/2009 12.53.04
 

I hope this helps to understand the reason and by-pass the problems with different settings and/or fixes.
Otherwise, I'm stuck and can't use the Web Store.
(if necessary you can register on www.EffectiveWeb.it I can provide you with Admin role)

 

6/23/2009 9:16:52 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: WebStore: Order Confirmation Template and Screen

P.S.: After last release, offers are now correctly sorted by order rank in Product list but not in product detail (-product.aspx) where they are still sorted by price.

Regards.
Diego

6/23/2009 9:26:28 AM
Gravatar
Total Posts 18439

Re: WebStore: Order Confirmation Template and Screen

Hi Diego,

As a consulting partner who offers mojoPortal development services it would be nice if you could debug these problems using the source code and propose a solution since you are in a better position to produce this problem than I am. My PayPal accounts are configured for US currency to support my own testing. I would set break points in the WebStorePayPalIPNHandlerProvider.cs and also in WebStorePayPalPDTHandlerProvider.cs and see what is happening when the order comes back and how it is parsing the amounts.

The relevant code is possibly here:

CultureInfo currencyCulture;
if (currencyUsed.Length > 0)
{
currencyCulture = ResourceHelper.GetCurrencyCulture(currencyUsed);
}
else
{
//Currency currency = new Currency(store.DefaultCurrencyId);
//currencyCulture = ResourceHelper.GetCurrencyCulture(currency.Code);
Currency currency = siteSettings.GetCurrency();
currencyCulture = ResourceHelper.GetCurrencyCulture(currency.Code);
currencyUsed = currency.Code;
}

decimal grossAmount = 0;
decimal.TryParse(paymentGross, NumberStyles.Currency, currencyCulture, out grossAmount);
decimal feeAmount = 0;
decimal.TryParse(payPalFee, NumberStyles.Currency, currencyCulture, out feeAmount);
decimal taxAmount = 0;
decimal.TryParse(payPalTax, NumberStyles.Currency, currencyCulture, out taxAmount);
decimal shippingAmount = 0;
decimal.TryParse(payPalShipping, NumberStyles.Currency, currencyCulture, out shippingAmount);
decimal settleAmount = 0;
decimal.TryParse(payPalSettlement, NumberStyles.Currency, currencyCulture, out settleAmount);

I would also look directly in the mp_PayPalLog table to see the raw response which is not displayed in the UI so you can see how the amounts are formatted when they come back from paypal.

I think I may understand the problem with the permission and will make a change to try and solve it. The Cart cookie is independent of the user authentication cookie so if you were logged in as admin and created the cart it assigned the admin user to the cart. I just need to add some additional logic if you login as a different user and already have a cart I need to add a check if the current user on the cart matches the login user and if not change it to the login user. 

It would be nice if you could do your testing using a build from svn trunk, that way if I fix something like this cart issue you can confirm it and we can work out these issues before the next release.

Best,

Joe

6/24/2009 5:11:54 PM
Gravatar
Total Posts 18439

Re: WebStore: Order Confirmation Template and Screen

Hi Diego,

I have been chewing on this problem (or parhaps it has been chewing on me ;-))

Its very difficult setting up a debuging environment for testing PayPal, it requires a dev machine with a public facing fixed ip address and setting up dns records etc.

So I realize my hope that you could do this may have been optimistic. Its just that its no less difficult for me, I got it working some time ago well enough to test it with my sandbox account. But I'm one guy and testing other currencies and such is a lot of time consuming work just to setup the test environments and thats a first step in which I may not still be able to produce the bug. I just don't have the resources to do that kind of exploratory debugging myself.

But an idea occurred to me if you are not able easily to setup an environment where you can step through the code, if you would work with me I could provide pre-compiled builds that you would have to install to see if the problems get solved. I think after an initial full installation I would be able to send you just a dll at a time to try to solve it. I can put in extra logging statements to help me diagnose what is the problem and you could process transactions and send me the logs to continue step by step to diagnose and solve it.

If that would work better let me know and I'll contact you off list to proceed.

Ideally if you could send me some data from rows of processed orders that you already have in the mp_PayPalLog table, all I need is the raw response field as this data can give me ideas what might be going wrong in the code and things to try for solving it.

Best,

Joe

6/25/2009 2:22:32 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: WebStore: Order Confirmation Template and Screen

Hi Joe,

Thanks for the support. I fully understand your time and infrastructure resources aren't unlimited and I really appreciate your availability.

We started our involvement in mojoPortal project a few months ago and after some testing we decided a progressive resource assignment.
In our small team (two partners and some consultants) at the moment I am the (only) one who is dedicating his time to the project.
Our plan of involvement in the project is based on the following steps:

  1. basic knowledge of the solution
  2. testing, setting-up
  3. building test/demo/training site
  4. custom skin design
  5. create hosting, design environment
  6. pilot site (tra il poco e l'abbastanza)
  7. translations
  8. 1st customer project (release goal: july)
  9. company production site dedicated to mojoPortal and to our traditional customer community
  10. start selling some services on-line with mojoPortal (to seek for some returns on our investments)
  11. setting-up our development environment
  12. create basic custom features
  13. develop custom applications

At the moment we are at step 9 and step 8 is covering more or less the cost of previous activities.
The success of step 10 is crucial to us to keep pushing as we were planning the official lounch of our production website by the end of June.
Nevertheless, despite the webstore struggles, we are moving on step 9 and 10 to satisfy some customer requests for step 8 and to do so I involved our .NET programmer, but (I must admit) we are not yet fully operational as we are used to for all other activities of our company.
Soon I will install myself the development environment of mojoPortal for Visual Studio and will start working on it.

For the webstore issues therefore, we are not yet so "effective" to start looking into the code and debugging. Besides, you have already pointed out the difficulty of setting up a debugging environment for testing Pay.

All this "bla bla" to say that your proposal to work with precompiled dll's is absolutely welcome. We could use our production site where all webstore and PayPal settings are already in place as a debug environment and send back to you the logs and feedback of any tests.

Looking forward for your contact.
Many Thanks!
Diego

6/25/2009 6:06:28 AM
Gravatar
Total Posts 18439

Re: WebStore: Order Confirmation Template and Screen

Hi Diego,

I'll contact you this afternoon with a link to download a new full package to upgrade your site. I will add a bunch of logging statements to help gather clues.

In the mean time if you could send me some data from your mp_PayPalLog table, just copy the contents of the RawResponse field from some existing rows where the problems occurred and paste into a text file. That may help me guess at what the problem is and what to try to fix it.

Best,

Joe

6/25/2009 7:47:29 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: WebStore: Order Confirmation Template and Screen

Hi Joe,

I've just sent by email the mp_PayPalLog for the transaction mentioned in this thread (4 records).

I'll wait for further instructions.

Diego

6/26/2009 6:02:05 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: WebStore: Order Confirmation Template and Screen

Dear Joe,

the fix you sent me works fine!
The test transaction in Euro with PayPal standard was completed as expected without any problems.
No more debugging is necessary. You can include the fix it in next release.

We can proceed now on our roadmap.
Should any further test be necessary, do not hesitate to contact me.

Thanks for the patience and competence.
The deserved beer is on the way!

Diego

6/26/2009 7:25:17 AM
Gravatar
Total Posts 18439

Re: WebStore: Order Confirmation Template and Screen

Excellent! I will be putting out a new release with this fix soon.

Many thanks for your help and the beers!

Cheers,

Joe 

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