Author Topic: Paypal (new API) problems  (Read 41522 times)

DutchDisturbed

  • Beginner
  • *
  • Posts: 14
Re: Paypal (new API) problems
« Reply #30 on: October 25, 2011, 21:10:31 pm »
I've found a solution that works for me! Go to
http://forum.virtuemart.net/index.php?topic=92068.0

to see my solution

ohonig

  • Beginner
  • *
  • Posts: 2
Paypal (new API) problems
« Reply #31 on: November 16, 2011, 15:19:36 pm »
And the solution for paypal combined with other payments is:

javascript is since the beginning different in browsers. and the function window.addEvent("domready", function() with the 2cond click-listener does not work at least in IE8 correct. my solution was a simple old-stylish onclick="chMd()" in the radio-button:

               <input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />
               <input type="radio" onclick="chMd()" id="paypalExpressID_ecm" name="payment_method_id" value="4" />
               <img id="paypalLogo" src="https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif" alt="PayPal Checkout Available" border="0" style="cursor:pointer;" /></a><script type="text/javascript">window.addEvent("domready", function() {
   $("paypalLogo").addEvent("click", function() {
      window.open('https://www.paypal.com/de/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500');
      });   });function chMd() {
         if(document.getElementById("paypalExpressID_ecm").checked)
         {
            $("paypalExpress_ecm").value="2";
         }
         else
         {   
            $("paypalExpress_ecm").value="";
         }
}
 
   </script>

in get_payment_method_paypal_ex.tpl.php:

$html .= '<script type="text/javascript">window.addEvent("domready", function() {

   $("paypalLogo").addEvent("click", function() {

      window.open(\''.$paypal_infolink[$lang_iso].'\',\'olcwhatispaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500\');

      });
   });
function chMd() {
         if(document.getElementById("paypalExpressID_ecm").checked)

         {

            $("paypalExpress_ecm").value="2";

         }

         else

         {   

            $("paypalExpress_ecm").value="";

         }

}

   </script>';

?>

   <fieldset><legend><strong>PayPal</strong></legend>

      <table border="0" cellspacing="0" cellpadding="2" width="100%">

          <tr>

              <td>

               <input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />

               <input type="radio" onclick="chMd()" id="paypalExpressID_ecm" name="payment_method_id" value="<?php echo ps_paypal_api::getPaymentMethodId();?>" />

paswan

  • Beginner
  • *
  • Posts: 4
Re: Paypal (new API) problems
« Reply #32 on: November 17, 2011, 11:56:22 am »
Here problem is that ,js is not  updating the value when paypal is checked.
So try this ,it works for me...........


 Replace all code of  get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\yourTheme\templates\checkout             
 with the attached file code.



[attachment cleanup by admin]

krofeta

  • Beginner
  • *
  • Posts: 33
Re: Paypal (new API) problems
« Reply #33 on: November 19, 2011, 01:42:04 am »
Here problem is that ,js is not  updating the value when paypal is checked.
So try this ,it works for me...........


 Replace all code of  get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\yourTheme\templates\checkout             
 with the attached file code.



this is solution for 1.1.9

marcel63

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #34 on: November 19, 2011, 14:20:51 pm »
I tried this and for me the error is still there. VM 1.1.9

roblux

  • Beginner
  • *
  • Posts: 3
Re: Paypal (new API) problems
« Reply #35 on: November 23, 2011, 06:58:23 am »
Here problem is that ,js is not  updating the value when paypal is checked.
So try this ,it works for me...........


 Replace all code of  get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\yourTheme\templates\checkout             
 with the attached file code.



Thank you Paswan. From error code credit card invaild to working like a treat.
Virtuemart 1.1.9


Its taken a huge amount of time to set the shop up with all prodducts and inf. to have to start looking around for another cart was almost beyond contemplation.

I hope this works as well for others.

Rob

mvvessem

  • Beginner
  • *
  • Posts: 2
Re: Paypal (new API) problems
« Reply #36 on: December 12, 2011, 17:35:39 pm »
Is there still no solution for this?


krofeta

  • Beginner
  • *
  • Posts: 33
Re: Paypal (new API) problems
« Reply #37 on: December 18, 2011, 19:47:49 pm »
And the solution for paypal combined with other payments is:

javascript is since the beginning different in browsers. and the function window.addEvent("domready", function() with the 2cond click-listener does not work at least in IE8 correct. my solution was a simple old-stylish onclick="chMd()" in the radio-button:

               <input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />
               <input type="radio" onclick="chMd()" id="paypalExpressID_ecm" name="payment_method_id" value="4" />
               <img id="paypalLogo" src="https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif" alt="PayPal Checkout Available" border="0" style="cursor:pointer;" /></a><script type="text/javascript">window.addEvent("domready", function() {
   $("paypalLogo").addEvent("click", function() {
      window.open('https://www.paypal.com/de/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500');
      });   });function chMd() {
         if(document.getElementById("paypalExpressID_ecm").checked)
         {
            $("paypalExpress_ecm").value="2";
         }
         else
         {   
            $("paypalExpress_ecm").value="";
         }
}
 
   </script>

in get_payment_method_paypal_ex.tpl.php:

$html .= '<script type="text/javascript">window.addEvent("domready", function() {

   $("paypalLogo").addEvent("click", function() {

      window.open(\''.$paypal_infolink[$lang_iso].'\',\'olcwhatispaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500\');

      });
   });
function chMd() {
         if(document.getElementById("paypalExpressID_ecm").checked)

         {

            $("paypalExpress_ecm").value="2";

         }

         else

         {   

            $("paypalExpress_ecm").value="";

         }

}

   </script>';

?>

   <fieldset><legend><strong>PayPal</strong></legend>

      <table border="0" cellspacing="0" cellpadding="2" width="100%">

          <tr>

              <td>

               <input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />

               <input type="radio" onclick="chMd()" id="paypalExpressID_ecm" name="payment_method_id" value="<?php echo ps_paypal_api::getPaymentMethodId();?>" />


This code is a half of file? Please, provide full file in txt. Thanks!

francisuan

  • Beginner
  • *
  • Posts: 7
Re: Paypal (new API) problems
« Reply #38 on: December 23, 2011, 00:45:40 am »
I found a very simple solution. In the "List payment methods" click on the paypal (new api) and use the "HTML-Form based (e.g. PayPal)" for the Payment method type.

stAn99

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 67
    • One Page Checkout for Virtuemart 2
Re: Paypal (new API) problems
« Reply #39 on: March 31, 2012, 16:38:15 pm »
Hello, according to my experience: "Error: Credit Card Type not found" is a result of a conflicting configuration of paypal new api within VM payment class configuration. It seems that for paypal express to work together with direct payment some fictional credit card data must be sent to paypal. The problem with this method is much more complex and i generally recommend to use a commercial paypal pro extensions with full support. Another issue with paypal new api is when the userfields from paypal don't match the userfields within virtuemart (as VM uses more of them such fax, etc... ).

Best Regards,
Stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart

fbc

  • Jr. Member
  • **
  • Posts: 75
    • Hospemex
Re: Paypal (new API) problems
« Reply #40 on: April 01, 2012, 18:43:17 pm »
We may have fixed the credit card errors issue, but, currency problems still exist. When selecting EUR as a currency the API still charges them in USD. In the old API you just went in and changed:
Code: [Select]
// "currency_code" => $_SESSION['vendor_currency'],
"currency_code" => $db->f('order_currency'),

In the new API I don't think it's going to be that easy.
Frank

lektrokuted

  • Beginner
  • *
  • Posts: 2
Re: Paypal (new API) problems
« Reply #41 on: January 18, 2013, 19:11:05 pm »
Hello to all, I have finally solved it.
Problem is in VM 1.1.9 where is changed /administrator/components/com_virtuemart/classes/ps_checkout.php
This is not a a best way and you can use it if you use only paypal payment.

Open
/components/com_virtuemart/themes/simplecheckout/templates/checkout/get_payment_method_paypal_ex.tpl.php

and remove below code:

<?php

 echo ps_checkout::list_payment_methods( $payment_method_id );

?>

Then modify line below from
<input type="radio" id="paypalExpressID_ecm" name="payment_method_id" value="<?php echo ps_paypal_api::getPaymentMethodId();?>" />
to
<input type="radio" id="paypalExpressID_ecm" name="payment_method_id" value="<?php echo ps_paypal_api::getPaymentMethodId();?>" checked />

Best Regards.

Hello, I only registered on the forum to say a big thank you for the solution!!! :-)

lejeannotfr

  • Jr. Member
  • **
  • Posts: 59
Re: Paypal (new API) problems
« Reply #42 on: May 11, 2013, 19:21:12 pm »
has we use to say in France : "une belle usine à gaz"... qu'il faut débugguer version aprés version!  ::)
i have a similar problem since weeks without any solution, i've tried on about 4 forums to find help, i would need to pay a developer to find a solution.
my cart is in 3 steps, i use only paypal integral evolution with the standard html configuration of VM, and in the last step, when i click on the the button to go on the paypal payment, i have the single screen showing that the order is ok but the payment has not been done by the customer... not serious. This bug is on IE8, safari and chrome, either in http or https mode... impossible to solve, nobody knows where that bug can come from... incredible.


[attachment cleanup by admin]

stinga

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 872
    • Squangle ltd
Re: Paypal (new API) problems
« Reply #43 on: May 15, 2013, 13:56:03 pm »
The redirect is not working, so it goes to this page rather than paypal.
Shouldn't be hard to fix.
Not sure if the new api uses the pp extra info fields or some other method. We use the old paypal method seems to work so why break it?! :-)
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

lejeannotfr

  • Jr. Member
  • **
  • Posts: 59
Re: Paypal (new API) problems
« Reply #44 on: May 22, 2013, 15:25:22 pm »
hi, i'm not a developper i used all the codes i already found into this forum. What you're telling me is impossible to debug for me, i've never changed the code of my paypal configuration for payment, what i discovered is that this problem never happened in VM 1.1.6, it only happens since i update to 1.1.9 (joomla 1.5.26), then i don't see how i could discover a solution alone...  ???