19 replies [Last post]
Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Was this information Helpful?

I just noticed that on "review order" page, at the bottom of it in payment information, the "card owner" field is blank, "card number" is a bunch of dashes, "expiration" is 0/0 and "cvv" is blank... even though I entered all those on the previous screen.

How come?

Won't the users be kinda thrown away by this, and confused?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Review Order does not seem to display credit card informatio

Yeah, there's something up in the loading routine. It should be saving info to the database, but I've found that PHP 4 doesn't like the code I was using to load. Can you convert to PHP 5? If not... well, the old site had a workaround in the forum but we don't have it here any more. Sticking out tongue

Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Re: Re: Review Order does not seem to display credit card inform

tsk, that's the thing... I can't go up to php5 just yet (not in my power to do that).

anyone still have that workaround handy?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Review Order does not seem to display credit card in
Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Re: Re: Re: Re: Review Order does not seem to display credit car

Ok, this is what the solution was in one of the threads you listed:

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

Hmm... ok, I see now. I think this is due to an improper usage of module_invoke_all() on my part, it just works in PHP 5 for some reason. Can you try opening uc_order.module and changing the following code in the function uc_order_load():

From:

<?php
  module_invoke_all
('order', 'load', $order, NULL);
?>

To:

<?php
 
foreach (module_implements('order') as $module) {
   
$func = $module .'_order';
   
$func('load', $order, NULL);
  }
?>

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

however, I see that this specific solution has already been implemented in alpha7b and I am still having that problem... hmm...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Review Order does not seem to display credit

Yeah, there's some other problem related to the load routine I believe... like it's trying to load data w/ no value. It's in there somewhere but I can't remember which one. Sad

Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Re: Re: Re: Re: Re: Re: Review Order does not seem to display cr

think hard, my friend... it's a matter of life and death, as this is the last step in the checkout process (and without this fixed, well, cart doesn't work)

macgeek's picture
Offline
Bug Finder
Joined: 08/15/2007
Juice: 36
Join me in a bug hunt!

The code mentioned above is in
this cached google page

and yes, it's been implemented in alpha7b. My server is running php 4.4.7 and I still have the same error - credit card details not showing on the "review order" form. Unfortunately (for me!) this is on a site of mine which is about to go live and is already overdue, so I'll be staying up late hunting down this bug and kicking in the shins.

Thanks for the other links, I've gone through them but haven't found a solution. Any other suggestions? They'd be most welcome - send to roger [at] macgeek.co.za

macgeek's picture
Offline
Bug Finder
Joined: 08/15/2007
Juice: 36
Vanilla install breaks

At first I thought this problem was due to perhaps some Ubercart upgrade problem as I was using an older version before updating to alpha7b. So I did the geeky thing - a clean Drupal 5.2 install with all of the modules needed to test the system again...and I got the same credit card error. So I think it's fair to say this is a pretty major bug that renders Ubercart unusable for all people on php 4 who are wanting to use any form of Credit Card payment (except off-site stuff). Where's my swatter?

macgeek's picture
Offline
Bug Finder
Joined: 08/15/2007
Juice: 36
Fixed - but maybe breaks in php5?

Change line 219 in uc_credit.module from

function uc_payment_method_credit($op, $arg1) {

to

function uc_payment_method_credit($op, &$arg1) {

This now works in php 4 for me - I hope it doesn't break anything in php 5? This is the suggestion made at the old site at:
www.ubercart.org/forum/development/1214/credit_card_information_isnt_passed_my_payment_gateway

macgeek's picture
Offline
Bug Finder
Joined: 08/15/2007
Juice: 36
The good news...

Here's the advice I used from the cached link above. You'll see that I've added in a & before the $arg1 (actually doing the opposite of Ryan's suggestion!) - I think that means that variable is being passed by reference, but I forget my basic programming. Here goes:

the good news is that it's saving the payment method just fine. I think what's going on here is some discrepancy w/ the way references are being passed by the functions. You'll notice in uc_payment_method_credit() and uc_checkout_pane_payment() (in uc_payment.module) that the first argument is a reference &$arg1. At least here in PHP 5, the fact that I'm passing a reference from uc_checkout_pane_payment() to uc_payment_method_credit() works just fine... I'm curious if in PHP 4 it would work if you take away the & from before &$arg1 for uc_payment_method_credit().

macgeek's picture
Offline
Bug Finder
Joined: 08/15/2007
Juice: 36
Line 216

Sorry, that should be line 216, not 219 in uc_credit.module

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Vanilla install breaks

I think I found the problem. All of the checkout pane functions are getting the order as a reference so they can change it, including the payment pane. The problem is that the payment method function is getting a copy of the order, and not the reference because the function declaration is wrong. It works in PHP5 because objects are always passed by reference.

Anywho, here's the fix:
Change line 218 of uc_credit.module from

<?php
function uc_payment_method_credit($op, $arg1) {
?>

to

<?php
function uc_payment_method_credit($op, &$arg1) {
?>

I'm reasonably certain this doesn't affect anything in PHP5, so it should be in the repository soon enough. I'll also look through the other payment methods to see if they have the same problem.

jetskier79's picture
Offline
Joined: 08/15/2007
Juice: 14
Re: Re: Vanilla install breaks

Good to see a solution to this. I moved to another host of mine that does use PHP5. I was fortunate that this was an option, or I would have been SOL.

damonish's picture
Offline
Joined: 08/15/2007
Juice: 15
Same issue

Hey again Lyle, I'm running into this issue as well. I'm currently seeing if our host cannot upgrade to php5 without messing with our production applications on the same host. For the time being I am trying to fix this particular issue while I wait for their response.

A bit more detail, this may need to be put into a different post but it closely relates to the initial issue described. Essentially none of the credit card information is displaying once "review order" was clicked - further, nothing was actually posted into the database under uc_payment_credit. It marks the entry and creates the rows just fine, but no data is inputted into the table besides the order number.

I'm still not very proficient with php but I'm using this as a learning experience, so any help at all would be greatly appreciated.

Harry

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Vanilla install breaks

Woohoo! I hope this bug is dead for good! Evil

Thanks for the help macgeek and Lyle. Glad to see this one knocked out.

lindsayo's picture
Offline
Bug Finder
Joined: 03/04/2008
Juice: 86
I am running PHP 5.2.5

and I am still getting this error.

    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/charlie/public_html/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/charlie/public_html/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/charlie/public_html/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/charlie/public_html/modules/ubercart/uc_store/includes/simplexml.php on line 244.

My server is running PHP 5.2.5. Any ideas?

-Lindsay

-----
Five Rings Web Design
www.fiveringswebdesign.com
Drupal site dev, graphic design, HTML/CSS layouts, site maintenance, ...

charlie's picture
Offline
Joined: 02/26/2010
Juice: 11
Review Order does not seem to display credit card information

Hello people,

We recently move our website to server & install a new SSL certificated.

Everything is working fine but the problem begins when someone try to buys something on the website. Once you click on “Checkout” and put your Customer, delivery and billing information & try to pay using a credit card, it shows a message reading something like:

"Please verify your credit card number and try again."

When I tried to check the "review order page" at the botton in the payment method any information appears, the "card owner" field is blank, the "card type" in blank, the "card number" in blank....

It doesn’t matter the credit card type, it´s only showing that message. So, I contact my merchant account and they verified they are receiving all the data except for the credit card number and the expiration date!!! So, they can´t process the order.

My php version in 5.0
My mysql version is 5.0

Is this something wrong on the shopping cart form? Where can I go over and check it out?

Please I need help!!! :S

Thanks in advanced.

Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Re: Review Order does not seem to display credit card informatio

You probably should have started a new forum thread for this discussion... but no biggie.
I suspect the problem involves your encryption key. Look here for details: http://www.ubercart.org/docs/user/14512/credit_card_settings but basically Ubercart stores a key for encrypting and decrypting the cc info outside the web root. Probably it didn't get copied over correctly when you made the move? If you go to www.example.com/admin/reports/status or www.example.com/admin/store you may get some hints as to what the problem might be.

charlie's picture
Offline
Joined: 02/26/2010
Juice: 11
Thanks

Thank you Andy for your reply.

I will do that.

Regards.