VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: strohberg on March 14, 2012, 18:39:49 PM

Title: PayPal API - Credit Card Option not going away (VM1.1.9+J1.5.23)
Post by: strohberg on March 14, 2012, 18:39:49 PM
Hey everybody,
I'm desperately hoping someone can help me. I have Virtuemart 1.1.9 and Joomla 1.5.23 installed. I got the PayPal API installed and after overcoming a problem with it, where it would skip the payment part when checking out. There was an issue, that when PayPal was the only payment option, the checkout page would skip the payment part. But I had to add another payment option (money transfer) anyway, so that problem went away.
But now I have the credit card option showing up for no reason. And aside the fact that I don't want it to show, it doesn't work either.
I cannot find an answer to this problem that works, anywhere. I've found this: http://www.aglobalweb.com/aglobalweb/blog/2-virtuemart/48-virtuemart-paypal-api-bugs-and-solutions.html
But it didn't do much other than mess up the checkout page even more.
Does anybody know how I can make the Credit Card Option go away?

Please help.
Title: Re: PayPal API - Credit Card Option not going away (VM1.1.9+J1.5.23)
Post by: callumgilhooly on April 03, 2012, 14:32:20 PM
Same here. I've tried all of the 'fixes' I can find but none of them seem to work.

I have 4 payment options and all I want to do is get rid of the 'extra' credit card option.

Anybody?

Thanks
Title: Re: PayPal API - Credit Card Option not going away (VM1.1.9+J1.5.23)
Post by: sixeyeco on July 08, 2012, 01:25:25 AM
I too have this problem, please help if you can.

Even when I only enable the paypal the credit card option is still there.
Title: Re: PayPal API - Credit Card Option not going away (VM1.1.9+J1.5.23)
Post by: AH on August 15, 2012, 09:42:01 AM
I always use the paypal standard module, not the Paypal API.

Works very well and no card option
Title: Re: PayPal API - Credit Card Option not going away (VM1.1.9+J1.5.23)
Post by: heiwong on October 09, 2012, 07:17:46 AM
Pls excuse my english,i have solution for the issue,need to add some code in ps_checkout and ps_payment_method.However i didn't test it much time before.

ps_checkout for don't skip to last step in checkout only paypal api
         if( isset($order_total) && $order_total <= 0.00 ) {
            // In case the order total is less than or equal zero, we don't need a payment method
            vmRedirect($sess->url(SECUREURL.basename($_SERVER['PHP_SELF'])."?page=checkout.index&ship_to_info_id=$ship_to_info_id&shipping_rate_id=".urlencode($shipping_rate_id)."&checkout_stage=".$VM_CHECKOUT_MODULES['CHECK_OUT_GET_FINAL_CONFIRMATION']['order'], false, false),"");
         }
         /***e-cshk.com***/ elseif ($count <= 1 && $cc_payments==false && $db_nocc->f("payment_method_id")!=="4") {
            vmRedirect($sess->url(SECUREURL.basename($_SERVER['PHP_SELF'])."?page=checkout.index&payment_method_id=$first_payment_method_id&ship_to_info_id=$ship_to_info_id&shipping_rate_id=".urlencode($shipping_rate_id)."&checkout_stage=".$VM_CHECKOUT_MODULES['CHECK_OUT_GET_FINAL_CONFIRMATION']['order'], false, false ),"");
         }

ps_payment_method don't show credit card option in paypal api non-direct payment and show credit card input in paypal api direct payment with Use Payment Processor option setting.

         /*****e-cshk.com****/if ($db->f("payment_method_id") !=="4" || PAYPAL_API_DIRECT_PAYMENT_ON == 1) {
         echo "<input type=\"radio\" name=\"payment_method_id\" id=\"".$db->f("payment_method_name")."\" value=\"".$db->f("payment_method_id")."\" ";
         if( $selector == "' OR enable_processor='Y" ) {
            echo "onchange=\"javascript: changeCreditCardList();\" ";
         }
         if ((($db->f("payment_method_id") == $payment_method_id) || $db->num_rows() < 2) && !@$GLOBALS['payment_selected']) {
            echo "checked=\"checked\" />\n";
            $GLOBALS['payment_selected'] = true;
         }
         else
         echo "/>\n";
         $discount  = $ps_checkout->get_payment_discount( $db->f("payment_method_id") );
         echo "<label for=\"".$db->f("payment_method_name")."\">".$db->f("payment_method_name");
         if ($discount > 0.00) {
            echo " (- ".$CURRENCY_DISPLAY->getFullValue(abs($discount)).") \n";
         }
         elseif ($discount < 0.00) {
            echo " (+ ".$CURRENCY_DISPLAY->getFullValue(abs($discount)).") \n";
         }
         echo "</label>";
         if ($horiz) {
            echo(" ");
         } else {
            echo("<br />");
         }
         }/*****e-cshk.com****/