Author Topic: [TRACKER #1428] Almost works with 1.5RC2  (Read 3424 times)

Lumenshroom

  • Beginner
  • *
  • Posts: 3
[TRACKER #1428] Almost works with 1.5RC2
« on: September 28, 2007, 16:55:25 pm »
I am trying the 1.1 beta and the latest nightly builds of RC2 ...
it all almost works, but on checkout after I select paypal or cash on delivery I get  a page of this error

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/local/psa/home/vhosts/kundaliniuk.com/httpdocs/Portal4/administrator/components/com_virtuemart/html/checkout.index.php on line 53


Clicking on the next button doesnt go anywhere ....

any ideas ?

Thanks
Lumenshroom

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: Almost works with 1.5RC2
« Reply #1 on: September 28, 2007, 18:21:28 pm »
Please use nightly build of Joomla 1.5 and VM 1.1, lots have been fixed since Joomla 1.5 RC2 and VM 1.1 beta 1

That said PayPal module has some issues.
http://virtuemart.net/index.php?option=com_flyspray&Itemid=83&do=details&task_id=1428&option=com_flyspray&Itemid=83

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: Almost works with 1.5RC2
« Reply #2 on: September 28, 2007, 18:24:11 pm »
Every time I Apply changes to PayPal configuration tab a slash \ is added to the code which looks like.
Quote
<?php
$url = \\\"https://www.sandbox.paypal.com/cgi-bin/webscr\";
$tax_total = $db->f(\\\"order_tax\\\") + $db->f(\\\"order_shipping_tax\\\");
$discount_total = $db->f(\\\"coupon_discount\\\") + $db->f(\\\"order_discount\\\");
$post_variables = Array(
\\\"cmd\\\" => \\\"_cart\\\",
\\\"upload\\\" => \\\"1\\\",
\\\"business\\\" => PAYPAL_EMAIL,
\\\"receiver_email\\\" => PAYPAL_EMAIL,
\\\"item_name\\\" => $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER.\\\": \\\". $db->f(\\\"order_id\\\"),
\\\"order_id\\\" => $db->f(\\\"order_id\\\"),
\\\"invoice\\\" => $db->f(\\\"order_number\\\"),
\\\"amount\\\" => round( $db->f(\\\"order_subtotal\\\")+$tax_total-$discount_total, 2),
\\\"shipping\\\" => sprintf(\\\"%.2f\\\", $db->f(\\\"order_shipping\\\")),
\\\"currency_code\\\" => $_SESSION[\\\'vendor_currency\\\'],\\\"first_name\\\" => $dbbt->f(\\\'first_name\\\'),
\\\"last_name\\\" => $dbbt->f(\\\'last_name\\\'),
\\\"address_street\\\" => $dbbt->f(\\\'address_1\\\'),
\\\"address_zip\\\" => $dbbt->f(\\\'zip\\\'),
\\\"address_city\\\" => $dbbt->f(\\\'city\\\'),
\\\"address_state\\\" => $dbbt->f(\\\'state\\\'),
\\\"address_country\\\" => $dbbt->f(\\\'country\\\'),
\\\"image_url\\\" => $vendor_image_url,
\\\"return\\\" => SECUREURL .\\\"index.php?option=com_virtuemart&page=checkout.result&order_id=\\\".$db->f(\\\"order_id\\\"),
\\\"notify_url\\\" => SECUREURL .\\\"administrator/components/com_virtuemart/notify.php\\\",
\\\"cancel_return\\\" => SECUREURL .\\\"index.php\\\",
\\\"undefined_quantity\\\" => \\\"0\\\",
\\\"test_ipn\\\" => PAYPAL_DEBUG,
\\\"pal\\\" => \\\"NRUBJXESJTY24\\\",
\\\"no_shipping\\\" => \\\"1\\\",
\\\"no_note\\\" => \\\"1\\\"
);
if( $page == \\\"checkout.thankyou\\\" ) {
$query_string = \\\"?\\\";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. \\\"=\\\" . urlencode($value) .\\\"&\\\";
}
mosRedirect( $url . $query_string );
} else {

echo \\\'<form action=\\\"\\\'.$url.\\\'\\\" method=\\\"post\\\" target=\\\"_blank\\\">\\\';
echo \\\'<input type=\\\"image\\\" name=\\\"submit\\\" src=\\\"http://images.paypal.com/images/x-click-but6.gif\\\" border=\\\"0\\\" alt=\\\"Make payments with PayPal, it is fast, free, and secure!\\\" />\\\';

foreach( $post_variables as $name => $value ) {
echo \\\'<input type=\\\"hidden\\\" name=\\\"\\\'.$name.\\\'\\\" value=\\\"\\\'.$value.\\\'\\\" />\\\';
}

echo \\\'</form>\\\';

}
?>

Joomla 1.0.13
VM 1.1 r962

Lumenshroom

  • Beginner
  • *
  • Posts: 3
Re: [TRACKER #1428] Almost works with 1.5RC2
« Reply #3 on: September 28, 2007, 23:06:07 pm »
Sorry I posted in the wrong place. I have now installed with RC2 :: VM1.1 LATEST nightly builds.

Have installed the COM and parts...

All runs...

at CHECKOUT step TWO is missed out, but can be gone back to ...

Whatever payment options I enable and select....  for instance this time I choose Nochex...

I  get a page of warnings...

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/local/psa/home/vhosts/kundaliniuk.com/httpdocs/Portal5/administrator/components/com_virtuemart/html/checkout.index.php on line 53


Wrong Datatype ?? how .. what does it expect >>

Thank you