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

ian999999

  • Beginner
  • *
  • Posts: 3
Re: Paypal (new API) problems
« Reply #15 on: July 06, 2011, 01:30:44 am »
Well, I ended up butchering the code to get it working.

Anyone interested in it, I made the following butcher....

in file get_payment_method_ex.tpl.php

I just commented out

Code: [Select]
//echo ps_checkout::list_payment_methods( $payment_method_id );
at the end of the file.

So now:
  • I can use the Paypal API on its own without any problems
  • I can use it as my sole payment method and still have it go through the cart steps without it throwing up credit card errors
  • I can actually get back to working on the rest of the store

You will need to select a couple of other payment options, but these will never show because the process will never display them.

I will say this, whilst it is appreciated someone has gone to the effort to make this component, it is NOT production ready and perhaps it shouldn't be included in the Virtuemart distribution until it is. If the original dev hasn't got time to work on it... scrap it.

rockbreaking

  • Beginner
  • *
  • Posts: 2
    • EnviroPicnic
PayPal API Error if Less Than Two Other Payment Methods
« Reply #16 on: July 15, 2011, 01:41:34 am »
Bug #230 (http://dev.virtuemart.net/issues/230) is entitled "PayPal API error if it's the only payment method available". 1.1.8

Unfortunately the Bug status is 'Closed' and incorrectly reported as fixed.  This may have been because its Description contained a link to the wrong Forum thread.  The correct forum thread is this one right here.

This issue remains in 1.1.9.

If the words "The PayPal (new API) module only works if you include at least two other payment modules with it" were added to the manual or the help menu, a lot of folks would be spared hours of trial-and-error.

In the mean time, a new bug report could be opened.

m.iannozzi

  • Beginner
  • *
  • Posts: 9
Re: Paypal (new API) problems
« Reply #17 on: July 18, 2011, 18:15:09 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.

namfo

  • Beginner
  • *
  • Posts: 2
Re: Paypal (new API) problems
« Reply #18 on: July 19, 2011, 10:03:07 am »
Hi

I use the new pp_api and one additional Payment-Method. So I also had this bug. After searching a bit I found the bug.

The Bug is in  \administrator\components\com_virtuemart\classes\ps_checkout.php
All the Payment Methodes are counted. But in the PayPal API Part the counting is missing.
How to fix it?

Serach for
Code: [Select]

$db_pp->query($q);
if ($db_pp->next_record()) {
    $pp_payment=true;
    $first_payment_method_id = $db_pp->f("payment_method_id");

and add the line
Code: [Select]
   
$count += $db_pp->num_rows();

So the result looks like
Code: [Select]
   
$db_pp->query($q);
if ($db_pp->next_record()) {
    $pp_payment=true;
    $count += $db_pp->num_rows();
    $first_payment_method_id = $db_pp->f("payment_method_id");


Cheers Chrigu

dougclark

  • Beginner
  • *
  • Posts: 1
Re: Paypal (new API) problems
« Reply #19 on: July 20, 2011, 16:32:54 pm »
Implemented this one but I am still getting the error...

Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

I have 2 Payment methods in place: Paypal_api and WorldPay.

Any further advice welcome.
Regards

seovisibly

  • Beginner
  • *
  • Posts: 3
Re: Paypal (new API) problems
« Reply #20 on: August 03, 2011, 20:56:17 pm »
i was hoping this thread would help my problem but it doesnt.

let me explain as clearly as possible:

firstly, let me say that everything works as it should on all browsers EXCEPT internet explorer (IE)

here is my problem with IE

i am using paypal api. i have 2 options with this for payment.
1. paypal - where it directs me to paypal to pay for product
2. credit option using paypal api - where i put all credit card information in and it processed it using paypal api in the background

right now, if i use the credit card option and enter all credit card info...it works!

however, if i click the paypal option and click next it gives me the "error: credit card number not found" as if i entered a bad credit card

AND if i do this

Open the file get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\default\templates\checkout

Look for this code:

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

and change for this

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

then paypal option works fine BUT now when i enter my credit card info and click next instead of taking me to the confirm page for the credit card it directs me to paypal instead as if i click the paypal radio button option.

it seems like IE cannot distinguish which radio button someone is choosing. it is either doing one or the other.

please help me fix asap. the site is live and this is driving me nuts.

iio

  • Beginner
  • *
  • Posts: 4
Re: Paypal (new API) problems
« Reply #21 on: August 09, 2011, 23:17:54 pm »
Hi

I am pretty new to all this .... I have built a VM store and want to use Paypal as my only method - (using 1.5.23 & 1.17)

I have my PP merchant account set up nicely & am using the new_api

If I only have a single payment method the customer is never sent to the select payment method & then of course the sale fails as there are no credit card details

I have activated COD - which I don't support in practice & it has added a credit card option that is also not supported

I see there is plenty of discussion - but can anybody point me to an easy to implement solution (no coding skills but I can edit code if I have to..) that is 100% going to work

THANKS MILLIONS ;D in advance - this is mega frustrating - I would tear my hair out - but sadly that is no longer possible :)

iio

  • Beginner
  • *
  • Posts: 4
Re: Paypal (new API) problems
« Reply #22 on: August 11, 2011, 12:09:31 pm »
Well, I ended up butchering the code to get it working.

Anyone interested in it, I made the following butcher....

in file get_payment_method_ex.tpl.php

I just commented out

Code: [Select]
//echo ps_checkout::list_payment_methods( $payment_method_id );
at the end of the file.

So now:
  • I can use the Paypal API on its own without any problems
  • I can use it as my sole payment method and still have it go through the cart steps without it throwing up credit card errors
  • I can actually get back to working on the rest of the store

You will need to select a couple of other payment options, but these will never show because the process will never display them.

I will say this, whilst it is appreciated someone has gone to the effort to make this component, it is NOT production ready and perhaps it shouldn't be included in the Virtuemart distribution until it is. If the original dev hasn't got time to work on it... scrap it.


What is the full path of this file - get_payment_method_ex.tpl.php _ I cant find it ......

vijalesh

  • Beginner
  • *
  • Posts: 2
Re: Paypal (new API) problems
« Reply #23 on: August 16, 2011, 09:26:50 am »
Hi th path for this is

components/com_virtuemart/themes/default/templates/checkout/

as for ther updates i am still not sure if all these is going to work...

iio

  • Beginner
  • *
  • Posts: 4
Re: Paypal (new API) problems
« Reply #24 on: August 21, 2011, 13:08:10 pm »
Hi th path for this is

components/com_virtuemart/themes/default/templates/checkout/

as for ther updates i am still not sure if all these is going to work...

Hi

Thanks for the path - I think that the butcher needs to happen in a different file in this path - get_payment_method_paypal_ex.tpl.php

The butcher is as described above - //echo ps_checkout::list_payment_methods( $payment_method_id );

Thanks for the help

ewanvrooyen

  • Beginner
  • *
  • Posts: 15
    • I-Tech Solutions and Web Design
Re: Paypal (new API) problems
« Reply #25 on: September 08, 2011, 22:03:11 pm »

ralfeez

  • Jr. Member
  • **
  • Posts: 119
Re: Paypal (new API) problems
« Reply #26 on: September 10, 2011, 18:10:39 pm »
I am trying to tag each of these discussion to hopefully follow any type of progress on this subject. Okay it looks like some people have found solutions that work for them. So far, I have not. I am using J1.5.23 and VM1.1.9. Nothing that I have seen so far will stop the dreaded "Error: Credit Card Number not found!" and still work with all of the other functions. I just want to use Paypal to collect funds. I also need Paypal to process a credit card without a Paypal account (but that is another subject). Someone needs to mark this as a bug and work on fixing it. If you need volunteers, let me know, but it has to be fixed to be able to use Virtuemart. I can't be the only one having this issue.
Thank you,
Ralph

ATek

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #27 on: September 30, 2011, 07:52:44 am »
Ralfeez - I have J1.5.23 and VM1.1.9 and I got it successfully working.  I am doing Paypal (New API) with NO other forms of payment.  Paypal Express Checkout DISABLED.  First check your settings with mine.  I have uploaded two pictures of what I have configured.  Obviously I blacked out my API Sig and other private details but you will get the basic idea.

I picked and chose two working fixes from the incredible amount of solutions out there.  Before doing the below solutions, IF you have a custom Virtuemart template such as VMJ Color your directories will have that name in them as opposed to "default". 

1. The first fix I did was:

Add this line of code ->
Code: [Select]
JHTML::script('joomla.javascript.js','includes/js/');
Here ->
Code: [Select]
/components/com_virtuemart/themes/default/templates/checkou/list_payment_methods.tpl.php 

2. Second fix I did was:

Comment out this line
Code: [Select]
echo ps_checkout::list_payment_methods( $payment_method_id );
From ->
Code: [Select]
components/com_virtuemart/themes/default/templates/checkout/
The result is now after step 2 in the checkout process it stops at step 3 and lets you choose Paypal, in my case it is the only choice so the buyer must simply click it.  Step 4 redirects them to Paypal where they finish the checkout, my secure header was also present on the Paypal website which is good, meaning the API is working.

Hope this helps someone out, was a pain to finally figure out but thanks to the bits and pieces on the web it finally was solved.  Good luck! Any more questions about my setup just ask.



[attachment cleanup by admin]

DutchDisturbed

  • Beginner
  • *
  • Posts: 14
Re: Paypal (new API) problems
« Reply #28 on: October 17, 2011, 21:18:19 pm »
What if you do want other payment options? For example i'd like to allow a general bank transfer as well.

how come there is no solution yet, while the problem exists for so long? is it that difficult to solve?

jinxyluv

  • Beginner
  • *
  • Posts: 1
Re: Paypal (new API) problems
« Reply #29 on: October 25, 2011, 17:26:21 pm »
i was hoping this thread would help my problem but it doesnt.

let me explain as clearly as possible:

firstly, let me say that everything works as it should on all browsers EXCEPT internet explorer (IE)

here is my problem with IE

i am using paypal api. i have 2 options with this for payment.
1. paypal - where it directs me to paypal to pay for product
2. credit option using paypal api - where i put all credit card information in and it processed it using paypal api in the background

right now, if i use the credit card option and enter all credit card info...it works!

however, if i click the paypal option and click next it gives me the "error: credit card number not found" as if i entered a bad credit card

AND if i do this

Open the file get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\default\templates\checkout

Look for this code:

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

and change for this

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

then paypal option works fine BUT now when i enter my credit card info and click next instead of taking me to the confirm page for the credit card it directs me to paypal instead as if i click the paypal radio button option.

it seems like IE cannot distinguish which radio button someone is choosing. it is either doing one or the other.

please help me fix asap. the site is live and this is driving me nuts.

Wahooooooooo!!!!! This worked! I use paypal api only and the paypal option was not showing up at step three of check out. I am not a programmer so I have been really confused at how to fix this. Thank You, Thank You!
BabyFull, LLC