News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Paypal checkout - Thank you for your Order! Doesnot Clear Cart

Started by hydro, January 18, 2012, 19:42:10 PM

Previous topic - Next topic

hydro

Hi,

Joomla 1.7.3
VM2 - latest General release
Firefox, Chrome, Safari

for the life of me I can't understand why when you checkout with Paypal the shopping cart won't empty.

The check process works, i.e Sandbox, confirmed, and orders appear correctly ALTHOUGH no emails are sent to the vendor,

(1) Does anyone know, how to check, modify the paypal plugin to clear the shopping cart or the cart session after checkout

(2) Does anyone know how to get the emails sent to the vendor

(3) Does anyone know how to direct the return from the checkout process to a confirmation  page of my choice other than the default "Thank you for your Order!"

regards

Milbo

1. this is intended, valerie will explain closer
2. should be fixed in the svn.
3. hmm new idea, it is just a change of the redirect, search for the layout name order_done in the cart view
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

juagicre

hi, i'm almost in the same situation:

(1) Can we do this easily in some way? where should we place the cart->remove() ???

(2) Also my clients do not get the mail, I hope this works at 2.0.1 as I'm going to migrate it now,
(2.1) How can the mail be modified, where do i have to look at? I can't find the mail code to adapt it to my needs...
(3) I've tryied changing redirect like this at confirm method from cart.php:
   $cart = VirtueMartCart::getCart(false);
   if ($cart) {
       $cart->confirmDone();
       //$view = $this->getView('cart', 'html');
       //$view->setLayout('order_done');
       /* Display it all */
       //$view->display();
      
       $mainframe = JFactory::getApplication();
       $mainframe->redirect('my-page.html');
but then i don't get redirected to paypal... so this page is the one is displayed just a few seconds while the redirection to paypal it's being handled... i guess hydro also wanted to know how to be redirected to his own page once the payment it's processed. How?

(Bonus question) About migration, is it better to install directly 2.0.1 or delete vm2 and install 2.0.1??? And I guess there is no way to keep changes done by myself at some core files :(

Thank you very much for this hard work!

webinspirit

I have the same issue + there is no order registered. The paiement go through but nothing in orders

What file would I need to use from the SVN

Thanks

ZX81

Joomla v1.7.3 VM 2.0.0

This was working fine for me but now I've got the same problem. As you say, orders are created, paypal sandbox completed successfully. I made some small changes to order confirmation mail and all was working fine. The only thing I did differently was to checkout as a guest (wanted to check the format of the order confirmation as a guest). Since that point the cart doesn't empty and no order confirmation mails. Help please  :(

ZX81

An update. I'm not using HTTPS for sensible areas. So when user returns from paypal they get the following message:

'Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.

Are you sure you want to continue sending this information?'


If the user does not click 'Continue' before being automatically redirected then the cart does not empty and an order confirmation email is not sent. If they do click it then all works perfectly. Any ideas how to solve without upgrading to 2.0.1 (I can't face the challange at the moment :))

lt635

Hi,

I'm having the problems with PayPal auto redirect back to shop and clearing of cart. 

Plus I did i purchase (using Sandbox), I added billing address including login and password and clicked 'register and checkout'.  Going back to the cart I am not logged in and I cannot login with the user and password I used unless I log in as administrator, go into to the shopper that I just registered for test and set 'block user' to 'no' in 'general user information'.  I am sure this is not how it is meant to be that you manually have to 'unblock' them??

Any help much appreciated.

Thank you
Regards
Lene

lt635

Hi,

I have just transferred my site to a hosting server for testing and I am still having problems with the cart not clearing after complete purchase. 

Does anybody know the solution to this?

Regards
Lene

alatak

Hi,

Quote'Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.

Are you sure you want to continue sending this information?'
This is normal. Which browser are you using?

QuoteThis was working fine for me but now I've got the same problem.
Which vm version are you running?
Can you turn the Paypal debug option, and give me the infos logged int the logs/palypal.log file.


ZX81

Hi, sorry for the delay in responding. Please see details below

Browser: Firefox
Joomla v1.7.3, VM2.0.0

Here are the details from the paypal log:

2012-02-09 19:44:09
message: plgVmConfirmedOrder order number: b90d5ce4

Like I said in the previous post. This only happens if the user doesn't click the ok to continue message in the browser. Paypal redirects anyway before you can finish reading the browser message. So at this point the cart doesn't get emptied and no order confirmation message.

thanks for looking into this.



alatak

Hi,

QuoteQuote
'Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.

Are you sure you want to continue sending this information?'
This is normal. Which browser are you using?
This is a normal message that you get when returning from a HTTPS page to a non HTTPS page. It is a browser message.

QuoteLike I said in the previous post. This only happens if the user doesn't click the ok to continue message in the browser. Paypal redirects anyway before you can finish reading the browser message. So at this point the cart doesn't get emptied and no order confirmation message.

Yes it is normal, the cart only empties when returning from paypal. If or some reason, the shopper wants to change his payment method, he can return to the shop, and change it. The cart is still there.

ZX81

Hi, I understand that it's normal for the browser message. I think the issue is that cart will NEVER get emptied this way and no confirmaton message will ever be sent as the user does not get sufficient time to answer 'Yes' to the browser message. The redirect back from paypal is too fast.

I guess this is the issue with not using SSL for sensible areas (I can't do that at the moment). But it is a shame because it seems so close to nearly working perfectly. What I don't understand though is the message in the paypal logs that you asked me for:

2012-02-09 19:44:09
message: plgVmConfirmedOrder order number: b90d5ce4


This looks to me like the plugin received the confirmation from payal. If so then why didn't it empty the cart and send the order confirmation? Did I misunderstand the message in the log?

alatak

Hi,

Quote2012-02-09 19:44:09
message: plgVmConfirmedOrder order number: b90d5ce4


This looks to me like the plugin received the confirmation from payal. If so then why didn't it empty the cart and send the order confirmation? Did I misunderstand the message in the log?
That means that the order has been confirmed and you are going to be redirected to Paypal.

I asked you to look in the log file, to find out if there was a "Notification" entry.
The work flow is the following:
1) shopper confirms the order
2) the shopper goes to paypal
3) the shopper pays via paypal
Then what ever you do, Paypal sends a notification to the web site (it is a server to server call), telling that this order has been paye, and the payment status is "completed". When Vm receives that notification, then it sends the email. Not before.

If in the log file you do not have an entry "plgVmOnPaymentNotification", then VM did not received that notification.
One reason could be that for example you have a htpassword on you web site.
Another reason could be that there is a fatal error.

To check that you have receive or not the notification from Paypal, go in your Web site log, and search for the word "notification", and check if the status is 200.
If you do not find that word, it means that paypal has not sent the notification.


ZX81

Joomla! v1.7.3/VM2.0.0

Thanks for that. It's a bit clearer how it supposed to work. I wasn't sure where to look for the 'notification' message. I assumed the paypal.log file but couldn't see any in there. So here is what I did. I switched on the debug option in the shop configuration. Lots of lovely messages were displayed for each step.

The work flow is the following:
1) shopper confirms the order
2) the shopper goes to paypal
3) the shopper pays via paypal

This is what happens for step 3 when I tried 2 seperate transactions using paypal sandbox - 1st one produces the order confirmation and empties the cart. The 2nd one fails.

--------------------------------------------------------------------------------------
My 1st transaction: on returning from paypal I clicked 'Yes' to the browser security message. The debug messages were displayed as follows

vmdebug self::$_jpConfig->lang en_gb
vmdebug vmTime: loadConfig db no: 0.0078921318054199
vmdebug Start used Ram 7M
vmdebug plgVmOnPaymentResponseReceived Var1:
Array
(
    [mc_gross] => 4.50
    [invoice] => 1c218af1
    [protection_eligibility] => Ineligible
    [address_status] => confirmed
    [payer_id] => AM4VCJNH9NCA6
    [tax] => 0.00
    [address_street] => 1 Main Terrace
    [payment_date] => 12:23:26 Feb 13, 2012 PST
    [payment_status] => Pending
    [charset] => windows-1252
    [address_zip] => W12 4LQ
    [first_name] => Test
    [address_country_code] => GB
    [address_name] => Test Surname
    [notify_version] => 3.4
    [custom] => v21vag5cn2m7hi1irfq7r42nv2
    [payer_status] => unverified
    [address_country] => United Kingdom
    [address_city] => Wolverhampton
    [quantity] => 1
    [payer_email] => test_1327753446_per@test.org.uk
    [verify_sign] => An5ns1Kso7MWUdW4ErQKJJJ4qi4-AvsCe9I1-Sc3lPOh6JqmOf-ZZeKC
    [txn_id] => 5XU48664DB090731C
    [payment_type] => instant
    [last_name] => Test
    [address_state] => West Midlands
    [receiver_email] => test@test.org.uk
    [pending_reason] => unilateral
    [txn_type] => web_accept
    [item_name] => Order Number: 1c218af1
    [mc_currency] => GBP
    [item_number] =>
    [residence_country] => GB
    [test_ipn] => 1
    [transaction_subject] => v21vag5cn2m7hi1irfq7r42nv2
    [handling_amount] => 0.00
    [payment_gross] =>
    [shipping] => 0.00
)

vmdebug paypal response Var1:
Array
(
    [mc_gross] => 4.50
    [invoice] => 1c218af1
    [protection_eligibility] => Ineligible
    [address_status] => confirmed
    [payer_id] => AM4VCJNH9NCA6
    [tax] => 0.00
    [address_street] => 1 Main Terrace
    [payment_date] => 12:23:26 Feb 13, 2012 PST
    [payment_status] => Pending
    [charset] => windows-1252
    [address_zip] => W12 4LQ
    [first_name] => Test
    [address_country_code] => GB
    [address_name] => Test Test
    [notify_version] => 3.4
    [custom] => v21vag5cn2m7hi1irfq7r42nv2
    [payer_status] => unverified
    [address_country] => United Kingdom
    [address_city] => Wolverhampton
    [quantity] => 1
    [payer_email] => test_1327753446_per@test.org.uk
    [verify_sign] => An5ns1Kso7MWUdW4ErQKJJJ4qi4-AvsCe9I1-Sc3lPOh6JqmOf-ZZeKC
    [txn_id] => 5XU48664DB090731C
    [payment_type] => instant
    [last_name] => Test
    [address_state] => West Midlands
    [receiver_email] => test@test.org.uk
    [pending_reason] => unilateral
    [txn_type] => web_accept
    [item_name] => Order Number: 1c218af1
    [mc_currency] => GBP
    [item_number] =>
    [residence_country] => GB
    [test_ipn] => 1
    [transaction_subject] => v21vag5cn2m7hi1irfq7r42nv2
    [handling_amount] => 0.00
    [payment_gross] =>
    [shipping] => 0.00
)

vmdebug vmTime: VirtuemartControllerPluginresponse Finished: 0.87798404693604
vmdebug End used Ram 17M
vmdebug Peak memory peak 17M
The message in the paypal log was as follows:
2012-02-13 20:22:59
message: plgVmConfirmedOrder order number: 1c218af1

----------------------------------------------------------------------------------------------------

My 2nd transaction: on returning from paypal I did not click 'Yes' to the browser message..  Paypal redirected anyway. The debug messages were displayed as follows


vmdebug self::$_jpConfig->lang en_gb
vmdebug vmTime: loadConfig db no: 0.0065271854400635
vmdebug Start used Ram 7M
vmdebug plgVmOnPaymentResponseReceived Var1:
Array
(
)

vmdebug paypal response Var1:
Array
(
)

vmdebug vmTime: VirtuemartControllerPluginresponse Finished: 0.094454050064087
vmdebug End used Ram 12M
vmdebug Peak memory peak 12M

The message in the paypal log was as follows:

2012-02-13 20:25:38
message: plgVmConfirmedOrder order number: 137c2bed

-------------------------------------------------------------------------------------------------------------

Any ideas why this worked for 1st transaction and not the 2nd one? The only difference was that I clicked 'Yes' to continue browser message on the first one. Also where should I be looking for the notification message? I'm guessing the browser is blocking the success confirmation. But is there anyway to force this?

alatak