Most of PayPal API issues come from some confusing configuration parameters, and on top of that there ARE still some bugs in the code. Mainly they are NOT bugs in payment method class, but in the way ps_checkout should handle this "special" payment method.
I attach to this post a ps_checkout file which SHOULD fix some of the issues regarding checkout steps.
PLEASE NOTE IT IS A WORK IN PROGRESS, NOT RECCOMENDED FOR PRODUCTION ENVIRONMENT.
AND PLEASE NOT IT IS ONLY INTENDED FOR VIRTUEMART 1.1.7
I would be glad if someone can test it, and let me know what's still wrong. Be prepared to explain to me in detail, because up until now i had never had many opportunities to use this payment method.
[attachment cleanup by admin]
I don't know anything about paypal's API but would be happy to try it, or am i not exactly your target audience here?
What sort of difference should we expect over the standard ps_checkout from 1.1.7?
EDIT: Disregard this. I've realised i'm using the standard Paypal payment method, not the API version currently. Does look like something I'd like to check out in future tho.
I try use paypal api payment method, quick checkout from it works fine, but direct one display this after inserting correct card details:
Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)
When i turn in php to display errors on top of that i get:
Deprecated: Function ereg_replace() is deprecated in /home/digital4/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 491
Notice: Undefined index: ppex_token in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 345
Notice: Undefined index: ppex_userdata in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 347
All API part is set-up correctly and I read so many post now and any of them was helpfully.
Please hellp me ...
@patrickmark:
please DO NOT TRIPLE POSTING! I already read your message in TWO OTHER different threads! This is useless and annoying. The same people usually read different topics.
Quote from: zanardi on February 19, 2011, 12:50:22 PM
Most of PayPal API issues come from some confusing configuration parameters, and on top of that there ARE still some bugs in the code. Mainly they are NOT bugs in payment method class, but in the way ps_checkout should handle this "special" payment method.
I attach to this post a ps_checkout file which SHOULD fix some of the issues regarding checkout steps.
PLEASE NOTE IT IS A WORK IN PROGRESS, NOT RECCOMENDED FOR PRODUCTION ENVIRONMENT.
AND PLEASE NOT IT IS ONLY INTENDED FOR VIRTUEMART 1.1.7
I would be glad if someone can test it, and let me know what's still wrong. Be prepared to explain to me in detail, because up until now i had never had many opportunities to use this payment method.
Work in progress ..
- any list for known issues with this patch ?
- any list for what should be tested ?
Asking becase I might be able to spend some time later this month testing this patch - Link to tracker ?!
@edgecrafter:
thank you for your reply. By "work in progress" i mean "not yet tested enough". I should have said "BETA".
There are so many posts about PayPal API that yet have to understand which are real issues and which are just configuration errors (maybe due to unclear documentation).
I fixed some real bugs (you can search for PayPal API in the tracker), what i am asking now is to use Virtuemart 1.1.7 or 1.1.7a with this new file and just test PayPal API checkout.
If everything works fine, great. All bugs are fixed. If not, describe me exactly the issue you encounter.
@zanardi
I am happy to test this but after searching through every file in com_virtuemart folder, cannot find the location to place this file!
Please provide the location and I will do some testing for you!
Thanks
@coachnet:
1. download the file "ps_checkout.php.txt" attached to my first post;
2. rename it to "ps_checkout.php"
3. save it in /administrator/components/com_virtuemart/classes/
Thank you.
Hi Guys,
I have posted a solution for this bug
http://www.aglobalweb.com/aglobalweb/blog/2-virtuemart/48-virtuemart-paypal-api-bugs-and-solutions.html
Check it out,
Regards,
Hello, thanks for your efforts
When I use the sanbox for payment with the Paypal API, the transaction completes but when I return to the store I see these warnings:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 944
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 980
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 149
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 159
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 182
Checkout
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/components/com_virtuemart/html/checkout.index.php on line 282
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 289
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 297
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 313
Warning: Invalid argument supplied for foreach() in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 321
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 337
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mysite/administrator/components/com_virtuemart/html/checkout.index.php on line 347
Hey All:
I've recieved this PAYPAL error - what do these mean?
At this time, we are unable to process your request. Please return to PAYPAL_EMAIL and try another option.
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
Parse error: syntax error, unexpected '@', expecting ')' in /home2/maicad/public_html/components/com_virtuemart/themes/vm/templates/pages/checkout.thankyou.tpl.php(61) : eval()'d code on line 208
Thanks for helping!
Please double check your e-mail address in PayPal API configuration parameters, i never heard of this issue in PayPal API module so i guess it is a misconfiguration.
Post again if you can not solve the issue.
Hi,
I changed the Payment class name to ps_paypal and it seems like its working...please go to Jamaicadirectdist.com
Thanks for your professional support and time.
Josh
Hmm... that sounds very strange. It should not do that, surely there has been some manual modification on your site, either voluntary or by accident.
If it works, you can leave it like that, but i suggest to check again sooner or later, maybe on a test site, what is the correct configuration.
Hello,
I have been struggling with the same problem. If I enable PayPal (new API) as the only payment method, a credit card payment option with radio button appears during checkout along with the PayPal (new API) option radio button. When I enable two payment methods, PayPal (new API) and credit card, an "Other Credit Card" payment option with radio button appears during check out. In either case if I select either PayPal (new API) or "Other Credit Card" as the payment option, and continue with the checkout I get the error:
Invalid Credit Card Number or Credit Card Verification Code.
Error: Invalid Credit Card Number or Credit Card Verification Code.
Error: Failure in Processing the Payment (ps_paypal_api)
Invalid Credit Card Number or Credit Card Verification Code
When PayPal (new API) is not enabled as a payment method, but a credit card is enabled, the checkout works fine.
I was able to enable and use just the PayPal (new API) in VM 1.1.5 by using the ps_checkout.php hack in this post:
Re: PayPal New API Adds Credit Card Payment Option that causes error
« Reply #13 on: February 16, 2011, 19:46:18 PM »
// Redirect to the last step when there's only one payment method
if( $VM_CHECKOUT_MODULES['CHECK_OUT_GET_PAYMENT_METHOD']['order'] != $VM_CHECKOUT_MODULES['CHECK_OUT_GET_FINAL_CONFIRMATION']['order'] ) {
if ($count <= 1 && $cc_payments==false) {
$vmLogger->debug("Only One Payment, skipping selection");
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']."&payment_method_ppex=2", false, false ),"");
}
elseif( 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),"");
}
}
I have another error entirely: when I click on the PayPal Express button I'm redirected onto a blank page which only has
Fatal error: Call to undefined function curl_init() in /var/www/web228/html/administrator/components/com_virtuemart/classes/payment/paypal_api/CallerService.php on line 55
on it, when I try PayPal as the payment option in the checkout the same happens only with the additional Warning that no CreditCard info was given above it. Other available payment options are CreditCard (now with 2 radiobuttons thanks to PayPal API) and Purchase Order (Nachname in German - as the shop is in German)
I'm using VirtueMart 1.1.7a on a 1.5.22 Joomla, sh404sef version 2.2.3.945 is installed and activated with mod_rewrite in use.
This error occurred both times before and after I replaced the ps_checkout.php with the one downloadable in zanardis first post.
The Page is life already you can find it here: http://www.imi-faktor.at/Strahlenbelastung (http://www.imi-faktor.at/Strahlenbelastung) The shop is supposed to work by 6th april 2011 so any help at all would be very appreciated.
I'm of course working and testing it at the moment so I might deactivate current payment options and activate others as I go, from the looks of it I might have to go with the PayPal legacy at this rate :'(
Also from the looks of it there is no patch from 1.1.7a to 1.1.8 and no work around to use the 1.1.7 to 1.1.8 patch either...I'm starting to panic
"curl" is a prerequisite of PayPal API. You should check with your hosting provider for its availability on your server.
Ah, thank you for the quick help, will do :-*
I have the same issue here. Hopefully someone can help with this!
I found out to use the "HTML-Form based (e.g. PayPal)" Payment method type for paypal and the payment with paypal went smoothly.
I hope this helps.
Hi,
The solution posted here worked for me.
Joomla 1.5
Virtuemart 1.1.9
Paypal API New
Payment Method Type: Use Payment Processor
Accepted Credit Card Types: None selected.
http://www.aglobalweb.com/aglobalweb/blog/2-virtuemart/48-virtuemart-paypal-api-bugs-and-solutions.html