News:

Looking for documentation? Take a look on our wiki

Main Menu

How to configure PayPal and other questions

Started by alatak, March 04, 2014, 10:55:11 AM

Previous topic - Next topic

alatak

Hello

How to configure it
1. In VM2 administration menu go to 'Shop' - 'Payment Methods'
2. Select "New" from the top menu.
3. Give it a name, i.e. "PayPal", set the checkbox to 'Published' = "Yes", select "VM-Payment, PayPal" in the dropdown list and click on 'Save'.
4. Now go to the second tab and configure your PayPal payment method. For testing you need to enter at least a PayPal payment (test-customer) email and a test-merchant (Sandbox) email.
5. Save your PayPal payment method configuration.

Setting a sandbox: http://docs.virtuemart.net/tutorials/28-plugins-payment-shipment-and-others/116-setting-a-testing-environment-in-paypal.html
Configuring PayPal Standard: http://docs.virtuemart.net/component/content/article/39-virtuemart-2/manual/shop-menu/paypal/117-paypal-standard.html

There are no payment methods in the dropdown
Install the "AIO" component. AIO is the acronym for All In One and includes all payment,shipment, custom fields, shopper plugins and VM modules. To install this component is mandatory for VirtueMart.
When updating VirtueMart, it is also required that you update the AIO component

I cannot find PayPal Advanced
Here is the list of the PayPal products provided by the PayPal plugin:
The PayPal products included i the plugin: http://docs.virtuemart.net/manual/39-paypal/115-paypal.html

Why are there no instructions for the URL for the IPN?
You do not need to configure the IPN in your PayPal account. PayPal will use the IPN provided by the Plugin

The order status is not updated when a payment has been done
There might be several reasons for that:
1) Your virtueMart version is < 2.0.26
We do not SEF the IPN URL anylonger. To fix this issue
in file /plugins/vmpayment/paypal/paypal.php
replace this line
"notify_url"       => substr(JURI::root(false,''),0,-1) . JROUTE::_('index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component', false),

with this line
"notify_url"       =>JURI::root() .  'index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component' . '&lang='.JRequest::getCmd('lang','') ,


2) Check if you received the IPN
In  your browser, try to access this URL http://yourdomain.com/index.php?option=com_virtuemart&amp;view=pluginresponse&amp;task=pluginnotification&amp;tmpl=component . There can be a problem here if you use 3rd party SEF since some member report that joomla redirect it to 404 when accessing this notification url.

3) Check your server logs, and search for "task=pluginnotification".
- If you don't find it, then it means that you did not receive the IPN from PayPal. PayPal should try again several times
- you found it: check the HTTP status
200, then everything is fine, the IPN has been received...
If anything else (like 500, 404 or 3xx) then you got a problem.
500 (error) can be checked in your php error log
404 (error) - missing url (either a wrong configured https, or the URL is not reachable from outside world like paypal)
3xx - a redirect by SEF or htaccess

4) your HTTPS status is 200, but your order still does not update
Check the security plugins, or components you have installed on your website, and disable them one by one.
Some security plugins remove $_POST, and the IPN cannot be validated.


I got an email
An error with your payment PayPal on your store Blablabla. The details are logged in the file paypal.x.log.php

With versions >= 2.0.26 whenever an error occurs, the payment plugins send you an email, and ask you to check your log file. The file paypal.x.log.php is stored in the log folder. The value in x is the payment method id.
- To know where is your log folder, go int the Joomla configuration, tab system and check your parameter Path to Log Folder .
- to know what is your payment method id, go in the payment method list, and check the number in the last column id.

Possible reasons for this email
1)Primary email address issue
In VirtueMart version 2.0.26x we added some extra security checking. One of them is to check that the transaction was really done on your PayPal account.
If you are not using your Primary email address in the PayPal configuration, you may have this problem.
Go in file plugins/vmpayment/paypal/paypal/helpers/paypal.php, search for the function _check_email_amount_currency
and replace those lines
if ($this->_method->paypalproduct =="std") {
            if ($paypal_data['receiver_email']!=$this->merchant_email and $paypal_data['business']!=$this->merchant_email) {
            $errorInfo=array("paypal_data" =>$paypal_data, 'merchant_email' =>$this->merchant_email);
                $this->debugLog($errorInfo, 'IPN notification: wrong merchant_email', 'error', false);
                return false;
            }
        }


with those lines
if ($this->_method->paypalproduct =="std") {
            if (strcasecmp($paypal_data['business'],$this->merchant_email)!=0 ) {
            $errorInfo=array("paypal_data" =>$paypal_data, 'merchant_email' =>$this->merchant_email);
                $this->debugLog($errorInfo, 'IPN notification: wrong merchant_email', 'error', false);
                return false;
            }
        }

This issue is fixed in versions > 2.0.26x

2) IP address issues
When the IPN is received, we check that it comes from PayPal. Sometimes, this check fails even though the IP comes from PayPal, we are at the moment investigating this issue.


I get a white page when calling https://www.domain.com/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component
This is absolutely normal. This page is not meant to display anything. It is the page used to answer to the PayPal IPN.


t68

I suspect that something is not right with my hosting regarding getting paypal ipn through to vm. But not sure what I should tell them about $_POST and stuff. Would much appreciate if someone could put some good wording in my mouth so I can pass it on to my hosting.

Skickat från min HTC One via Tapatalk


t68

Hi again!
As adviced here I tried accessing this url on my shop:
http://mydomain.com/index.php?option=com_virtuemart&amp;view=pluginresponse&amp;task=pluginnotification&amp;tmpl=component

But got this error message:
"Fatal error: Call to undefined function myFile() in /home/k/kulturve/www/plugins/vmpayment/paysondirect/paysondirect.php on line 369"

So it looks like I get an error concerning another payment plugin I use, payson.

On my VM I got problems with payment statuses not being updated in my orders list by Paypal but Payson works.



alatak

Hello
Obiously Payson do not work correctly.
Disable it in Joomla and check if the order status in Paypal is updated.
If it is, then ask the Payson developer to check his code.

t68

Thanks for input!... and guess what? Just checked in on Payson and discovered that Im not running their latest version of the plugin.
Stupid mistake on my side. Gonna update asap. Hopefully this fixes my issues.

Skickat från min HTC One via Tapatalk


t68

Me again. Updating the Payson plugin did the trick. Now both PayPal and Payson payments are updating order status in vm as they should.

Thanks for pointing me in the right direction!

Skickat från min HTC One via Tapatalk


atomixit

Hi all,

I really need help as to where I can find the vm paypal download (Free version) I deleted the built in paypal plugin because I couldn't configure it. It would only give me a screen full of text.

Any help would be appreciated.

jenkinhill

Install the VM aio component for your VM version, which should currently be VM2.6.6 - get files  from http://dev.virtuemart.net/projects/virtuemart/files

Never delete plugins, just unpublish them.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

atomixit

Thanks for the reply JenkinHill

Please see specs below:

PHP Built On    Linux lnxwebr05.cpt.wa.co.za 2.6.32-531.17.1.lve1.2.60.el6.x86_64 #1 SMP Tue Jul 8 11:25:32 EDT 2014 x86_64
Database Version    5.5.36-cll
Database Collation    utf8_general_ci
PHP Version    5.3.27
Web Server    Apache
WebServer to PHP Interface    cgi-fcgi
Joomla! Version    Joomla! 3.3.1 Stable [ Ember ] 11-June-2014 13:30 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

How can I check the Virtuemart version ? ( Totally new to this )

Also a real newby question - I downloaded the latest version of the aio (com_virtuemart.2.6.6_ext_aio)
How do you install it ?

GJC Web Design

Quote
How can I check the Virtuemart version ? ( Totally new to this )

Joomla->Extensions->extension manager->manage  or left hand side of every VM admin page

QuoteAlso a real newby question - I downloaded the latest version of the aio (com_virtuemart.2.6.6_ext_aio)
How do you install it ?

as you would for any other extension  Joomla->extensions->extension manager->Upload Package File
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

atomixit

Thanks for all the help so far,

Still got the same result.

Turns out im on VM 2.9.6, installed the correct packages but still getting the same thing ( As soon as you create a payment method with paypal, the css seems to bomb out and only text is displayed - No config options either )

Cant get any payment options to work - Tried Paygate, Paypal, Payfast ... None of them are working ...

jenkinhill

VM2.9.6 is not for use on a live site, it is a development version, pre-release for VM3. There were bugs in 2.9.6, which is why 2.9.8 was released - for further testing. If you are not an experienced Joomla/VM user then you should use VM2.6.6 on Joomla 2.5.22
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

lanthan

Hi,
my PayPal config still does not work correct. My shop does not receive the payment confirmation even payment was successful. So no change of order status and so on.

Today I got the following PayPal-Warning E-Mail "immediate payment confirmation".

I shall check the following link:
https://mydomain.de/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&lang=de
https://mydomain.de/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&lang=en

If I call the link in my browser a blank (correct) page appears but the link changes into the following:

https://mydomain.de/de/?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&lang=de

I have a multi language shop. I am using .htaccess with a rewrite url funktion to hide index.php. I think here is the problem.

Any ideas how to solve this problem?

Thanks
Lanthan

arnold.pietersen

Hi

What does: Expected max amount mean when configuring the PayPal payment method. We will not know in advance what the amount will be, right?

The explanation is not that clear.

Kind Regards

ARNOLD