VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: alexs on April 25, 2008, 16:35:09 PM

Title: [TRACKER 2060] VirtueMart and Paypal
Post by: alexs on April 25, 2008, 16:35:09 PM
I'm trying to set up VirtueMart on a new Joomla 1.5 installation. I had it working perfectly working with PayPal on an old server with an older version of Joomla. Users were automatically redirected to PayPal where they could enter their credit card details and make payment.

However, now what happens during the checkout process is that it finishes with "Thank you for your order. Your order has been successfully placed! A confirmation email has been sent to xxx".

Customers receive a confirmation email, but they are at no point directed to PayPal to pay. Does anyone know what I'm doing wrong?
Title: Re: VirtueMart and Paypal
Post by: dawit on April 26, 2008, 00:23:26 AM
what ever payment method your using you should make sure you are not using one of these "Address only / Cash on Delivery",
"HTML-Form based (e.g. PayPal)" when customising payment method form for the payment method type. use one of these instead "Credit Card",
"Use Payment Processor",
"Bank debit".
Title: Re: VirtueMart and Paypal
Post by: gregdev on April 26, 2008, 05:14:57 AM
Is PayPal the only payment method you have activated?

Greg
Title: Re: VirtueMart and Paypal
Post by: Dave Withnall on April 28, 2008, 13:09:47 PM
I have this same issue.

And yes, PayPal is the only activated payment method.

Additionally:
- I have disabled the shipping address & method options in the checkout.
- I have also set the site to "No Account Creation".

I just want the end user to enter a single address and pay through paypal.
Title: Re: VirtueMart and Paypal
Post by: Dave Withnall on April 28, 2008, 13:11:56 PM
One more thing. I am trying to use the paypal sandbox for testing.
To do this I have followed the details as per this forum entry http://forum.virtuemart.net/index.php?topic=11167.new

Ie.
Test mode = No
$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
everythign else is the default.

Title: Re: VirtueMart and Paypal
Post by: TommyBwebs.com on April 28, 2008, 23:18:23 PM
I'm also having the same problem.

Joomla 1.0.15
VM 1.1.0 stable

PayPal is the only payment method checked. HTML-Form based (e.g. PayPal) method is chosen

Someone said not to do this...but I don't understand. PayPal needs to be the one to process the credit card. right??

Using PayPal's developer sandbox also. When an order is completed, it goes to the "Thank you for your order" page directly without sending me to PayPal.

Also shows this error:
Parse error: syntax error, unexpected '>' in /home/headstng/headstrongfoundation-www/cms/components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php(61) : eval()'d code on line 44

There is a link at the bottom that says:  Follow this link to view the Order Details.

When I do that, I get:
Parse error: syntax error, unexpected '>' in /home/headstng/headstrongfoundation-www/cms/components/com_virtuemart/themes/default/templates/pages/account.order_details.tpl.php(55) : eval()'d code on line 44
Error: The code of the payment method PayPal (PP) contains a Parse Error!
Please correct that first

Please Help if you can!!

Thanks all.
Title: Re: VirtueMart and Paypal
Post by: davidm on April 28, 2008, 23:51:09 PM
I have the same issue too.  I also have Joomla 1.0.15 & VM 1.1.0 stable.

I have the site set to "No Account Creation", I only have the PayPal payment method enabled and have it set to HTML-Form based. I do not want to handle the credit card details but want Virtuemart to use the PayPal site for this. Like the other posts described here, it doesn't go to PayPal and just takes the user straight to the success page.  I do not see the errors reported by Dave Withnall though.

Any help to know how to go about trouble-shooting this would be much appreciated.

Thanks

Title: Re: VirtueMart and Paypal
Post by: Penn Wooding on April 29, 2008, 15:47:02 PM
What is happening with PayPal?  It does rather seem that if you only have this enabled, it won't work.  However, if you have credit card enabled, PayPal seems to work okay.  Is PayPal not working on its own?
Title: Re: VirtueMart and Paypal
Post by: Penn Wooding on April 29, 2008, 17:05:27 PM
I think I know what the problem is, if I look in "checkout" three and four are both checked.  Unfortunately, they are grayed out so I can't uncheck them.  Any ideas?
Title: Re: VirtueMart and Paypal
Post by: davidm on April 30, 2008, 00:31:40 AM
I've found changing my settings from "No Account Creation" to "Silent Account Creation" helps and the checkout process now takes the user to the PayPal pages. I'd prefer "No Account Creation" but I think I can use this as a workaround for now.
Title: Re: VirtueMart and Paypal
Post by: Brian on April 30, 2008, 16:43:57 PM
Quote from: davidm on April 30, 2008, 00:31:40 AM
I've found changing my settings from "No Account Creation" to "Silent Account Creation" helps and the checkout process now takes the user to the PayPal pages. I'd prefer "No Account Creation" but I think I can use this as a workaround for now.
Same thing worked for me.  I was only able to get paypal to work using this method.  No go without registration.
Title: Re: VirtueMart and Paypal
Post by: solidstatic on April 30, 2008, 20:50:42 PM
I changed the registration from "None" to "silent" and now when I register it brings up someone else's information, (address, name, phone, ...) so that won't work at all.
Title: Re: VirtueMart and Paypal
Post by: aravot on April 30, 2008, 22:02:24 PM
Tracker URL http://dev.virtuemart.net/cb/issue/2060
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: RCheesley on April 30, 2008, 23:17:43 PM
Same error occurring here, hope it gets sorted soonish :)
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Soeren on May 02, 2008, 11:05:03 AM
New PayPal Code for VirtueMart 1.1 is posted here:
http://forum.virtuemart.net/index.php?topic=39584.0

Besides, I will fix the no-redirection error.

ciao, Sören
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Lex on May 23, 2008, 09:00:41 AM
Quote from: solidstatic on April 30, 2008, 20:50:42 PM
I changed the registration from "None" to "silent" and now when I register it brings up someone else's information, (address, name, phone, ...) so that won't work at all.

I'm pretty sure this only happens due to "cookies". If you logout and clear the cache the address from the last person that used the store on that browser doesn't show.

Looking forward the the RE-DIRECT fix. Thanks Soeren.
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Lex on May 23, 2008, 09:58:38 AM
One more thing that I think is relevant to this post since it came about while trouble the Paypal redirect issue...

Using "Silent Registration" when you register a user, TWO instances of the same user appear, and when that user places an order, TWO instances of the same order appear? I've attached a picture for you to see. I've got a test installation running where this does not happen. When you delete either one of the instances, they both disappear.

Is this something necessary, or a fluke of some kind. Will affect the person in charge of maintaining the website?

thanks.  ???

[attachment cleanup by admin]
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Lex on May 28, 2008, 04:57:26 AM
when do you think the "no re-direction" error will be fixed?

thank you.
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Lex on June 17, 2008, 00:42:15 AM
Soren, were you able to fix the Paypal "no-redirect" problem? We would like to consider not requiring a registration at all. So far, re-direct only happens if at least "silent-reg" is activated. If you can't get to this, can you give me some hints as to what script is responsible so I can try to hack it?

Cheers!
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: Dave Withnall on June 17, 2008, 01:01:46 AM
The latest nightly works fine for me
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: swatkins on June 17, 2008, 03:38:31 AM
I am haveing the same problems with the no redirect.. I read the above link , used that code and still have the same problem... HELP :)
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: triaddsn on June 17, 2008, 17:56:42 PM
Am also having the same issue.  A customer ordered today and didn't redirect just went to the Thank You and created a pending order.  Also, silent account creation puts in the information of the last person who filled in info at the site.  I can clear the cookies as mentioned above from my site, but customers will not understand this...any fix for this?
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: swatkins on June 24, 2008, 06:14:08 AM
I am having the same problem with three different stores. :(  Any idea when this will be addressed?   I really need for no registration to be fixed...
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: swatkins on June 24, 2008, 06:21:10 AM
Quote from: Soeren on May 02, 2008, 11:05:03 AM
New PayPal Code for VirtueMart 1.1 is posted here:
http://forum.virtuemart.net/index.php?topic=39584.0
Besides, I will fix the no-redirection error.
ciao, Sören

Hi Soren..

Any news on fixing the redirection error? I applied the code you posted and still no redirection...

Thanks for your time and effort..

  Steve
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: sjdalf on July 24, 2008, 18:59:36 PM
hi,

has this issue been rectified? I can't seem to find anything that indicates it has (including installing the 1.1.1 patch).

So I dabbled with the code and implemented a hack which gets around the problem (though whether my hack has repercussions I don't know).

the first file /components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php.

lines 39,40

if( empty($auth['user_id'])) {
   return;

basically, because no user is being registered, $auth['user_id'] is empty, so the condition is called and the return is made. This is a problem, because subsequent code includes the place where the PayPal file is included (including the code that does the redirection). So first I commented out these two lines.

Once this is done, the code that calls the PayPal stuff can be called. However, the PayPal code requires values in an object '$db->f', which you can see.

This object is set in the file /administrator/components/com_virtuemart/html/checkout.thankyou.php. The line where it is set is line 52: $db->query($q). Problem is, the query involved in this call uses $auth["user_id"] on line 50. The result is a query which returns nothing, because $auth["user_id"] is empty. So I just commented out line 50, because I figured the other WHERE statements checks which involve 'order_id' will select the right database entry anyway.

I don't know much about the ins and outs of Virtuemart, so I could be way off. What do other people think?


- Simon
Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: sjdalf on July 27, 2008, 17:07:12 PM
... following on from my previous post

well, my site re-directed to PayPal, but following that, upon return to my site from PayPal, I received the message "Order not found!".

I worked out that this is also because of the object '$auth["user_id"]'.

in the file administrator/components/com_virtuemart/html/checkout.result.php you will see at line 29 the following:

$q .= "#__{vm}_orders.user_id= " . $auth["user_id"] . " ";

comment out this line and remove the 'AND' from line 30 to get

$q .= "#__{vm}_orders.order_id= $order_id ";

this results in a successful return to the order confirmation page with a message notifying you that the order has been placed.



A couple of things though:
1. the order status remains at pending even though the PayPal transaction is successful.
2. If you go to click on the invoice link, you are denied entry because you are not actually a user who is logged in (i.e. this is unregistered mode).


This second point in particular suggests a more fundamental issue with the contradiction between not having users register and having paypal order information reference registered users stuff.


What is happening with regards to the official rectification of this issue?




Title: Re: [TRACKER 2060] VirtueMart and Paypal
Post by: alek123 on September 15, 2008, 14:50:44 PM
Quote from: sjdalf on July 27, 2008, 17:07:12 PM
... following on from my previous post
well, my site re-directed to PayPal, but following that, upon return to my site from PayPal, I received the message "Order not found!".
I worked out that this is also because of the object '$auth["user_id"]'.
in the file administrator/components/com_virtuemart/html/checkout.result.php you will see at line 29 the following:

$q .= "#__{vm}_orders.user_id= " . $auth["user_id"] . " ";
comment out this line and remove the 'AND' from line 30 to get
$q .= "#__{vm}_orders.order_id= $order_id ";
this results in a successful return to the order confirmation page with a message notifying you that the order has been placed.
A couple of things though:
1. the order status remains at pending even though the PayPal transaction is successful.
2. If you go to click on the invoice link, you are denied entry because you are not actually a user who is logged in (i.e. this is unregistered mode).
This second point in particular suggests a more fundamental issue with the contradiction between not having users register and having paypal order information reference registered users stuff.

What is happening with regards to the official rectification of this issue?


TANK YOU!!! This work for me.

Alek