News:

Looking for documentation? Take a look on our wiki

Main Menu

Paypal Payment - Things do not appear to be working

Started by mixedst, April 12, 2017, 17:12:23 PM

Previous topic - Next topic

mixedst

Hello,

On my website, v.3.2, I am no longer able to work with Paypal.

I use Paypal Standard.

2 weeks ago, it was working without any problem, however, it is not working anymore.

When i add product and go to check-out, it is redirected to Paypal and it says "Things do not appear to be working"

Anybody has the same problem?

Cameleon

I have currently some problem with the paypal IPN.

Also my Paypal sandbox was working fine last week, and stopped working this week (got an internal server error when arriving on paypal's gateway).

mixedst

Then it is a general error caused by Paypal.

Did you contactPaypal?

They told me it is about item_name_1 parameter but it did not work for me.

Asked them again but no response.

Any solution would be welcome



Cameleon

Some update :

I choose to reinstall Joomla and virtuemart on another server to be sure of the problem.

- Installed Joomla_3.6.5-Stable-Full_Package
- Installed com_virtuemart.3.2.1
- Installed com_virtuemart.3.2.1_ext_aio
- Installed com_tcpdf_1.0.2
- Configured Paypal in sandbox as payment, with a sandbox paypal account different from the one i was using
- Made an order with the virtuemart's demo datas

And the problem was also here : Internal Server Error on paypal gateway.

Infos on the paypal debug mode before being sent to paypal :
plgVmConfirmedOrder:
order   number:   CZXI03

plgVmConfirmedOrder:
Amount/Currency   stored   11.76   paymentcurrency   47   orderusercurrency47

PayPal request::
Array
(
        [cmd]   ⇒   _ext-enter
        [redirect_cmd]   ⇒   _xclick
        [paymentaction]   ⇒   sale
        [upload]   ⇒   1
        [business]   ⇒   test-paypal@paypal-test.com
        [receiver_email]   ⇒   test-paypal@paypal-test.com
        [order_number]   ⇒   CZXI03
        [invoice]   ⇒   CZXI03
        [custom]   ⇒   p14jrmjtre25nd5paboem0k9v0
        [currency_code]   ⇒   EUR
        [address_override]   ⇒   0
        [first_name]   ⇒   test
        [last_name]   ⇒   test
        [address1]   ⇒   42   test
        [address2]   ⇒ 
        [zip]   ⇒   06000
        [city]   ⇒   test
        [state]   ⇒ 
        [country]   ⇒   FR
        [email]   ⇒   xxx@xxx.xx
        [night_phone_b]   ⇒ 
        [return]   ⇒   http://xxx.com/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=CZXI03&pm=2&Itemid=124&lang=
        [notify_url]   ⇒   http://xxx.com/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=
        [cancel_return]   ⇒   http://xxx.com/index.php?option=com_virtuemart&view=vmplg&task=pluginUserPaymentCancel&on=CZXI03&pm=2&Itemid=124&lang=
        [rm]   ⇒   2
        [bn]   ⇒   VirtueMart_Cart_PPA
        [no_shipping]   ⇒   0
        [no_note]   ⇒   1
        [image_url]   ⇒   http://xxx.com/images/virtuemart/vendor/vendor.gif
        [item_name]   ⇒   Order   Number:   CZXI03
        [amount]   ⇒   11.76
)

So the problem is coming from either Paypal or the plugin



GJC Web Design

have u tried the 2 return and notify urls to see what response your site gives?  should be 200
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

mixedst

I received this not efrom Paypal, we need an update according to this parameter

Thanks for contacting PayPal Technical Assistance.

I run a test on your website and checked the variables that you are passing through the PayPal button.

I noticed that you are using the UPLOAD cart function. With this function the item name variable must be like "item_name_1" with the underscore and one in number at the end ("_1"). You were not passing this variable name correctly but adding the _1 it works fine.

Just change the name of this variable and it will work.

Do not hesitate to contact me back if you need more details regarding this subject.

Thanks,

Kind Regards,
Andrea | PayPal Merchant Technical Support

mixedst

My logs:

2017-04-10 15:29:56 DEBUG plgVmConfirmedOrder: order number: HUCF044
2017-04-10 15:29:56 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 46.35 paymentcurrency 47 orderusercurrency47
2017-04-10 15:29:56 DEBUG PayPal request:: Array
(
    [cmd] => _ext-enter
    [redirect_cmd] => _xclick
    [paymentaction] => sale
    [upload] => 1
    [business] => paypal@xxx
    [receiver_email] => paypal@xxx
    [order_number] => HUCF044
    [invoice] => HUCF044
    [custom] => 8hsp7omoebc9doqu071ok97hd6
    [currency_code] => EUR
    [address_override] => 0
    [first_name] => deneme
    [last_name] => deneme
    [address1] => deneme
    [address2] =>
    [zip] => 7000
    [city] =>
    [state] =>
    [country] => FR
    [email] => deneme@xxx
    [night_phone_b] =>
    [return] => http://xxx/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=HUCF044&pm=1&Itemid=196&lang=fr-FR
    [notify_url] => http://xxx/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=fr-FR
    [cancel_return] => http://xxx/index.php?option=com_virtuemart&view=vmplg&task=pluginUserPaymentCancel&on=HUCF044&pm=1&Itemid=196&lang=fr-FR
    [rm] => 2
    [bn] => VirtueMart_Cart_PPA
    [no_shipping] => 0
    [no_note] => 1
    [image_url] => http://xxx/images/stories/virtuemart/vendor/lo4.png
    [item_name] => Numro de la Commande: HUCF044
    [amount] => 46.35
)

Cameleon

Quote from: mixedst on April 13, 2017, 13:12:31 PM
I received this not efrom Paypal, we need an update according to this parameter

Thanks for contacting PayPal Technical Assistance.

I run a test on your website and checked the variables that you are passing through the PayPal button.

I noticed that you are using the UPLOAD cart function. With this function the item name variable must be like "item_name_1" with the underscore and one in number at the end ("_1"). You were not passing this variable name correctly but adding the _1 it works fine.

Just change the name of this variable and it will work.

Do not hesitate to contact me back if you need more details regarding this subject.

Thanks,

Kind Regards,
Andrea | PayPal Merchant Technical Support

Didn't work for me for my internal server error problem.

I have in my log :

2017-04-13 14:29:52 DEBUG plgVmConfirmedOrder: order number: 7FBB023620
2017-04-13 14:29:52 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 62.6 paymentcurrency 47 orderusercurrency47
2017-04-13 14:29:52 DEBUG PayPal request:: Array
(
...
    [item_name_1] => Commande numéro : 7FBB023620
    [amount] => 62.6
)

Even after updating the item_name the error is still here.


mixedst

we need a updated paypal plugin, paypal changed some parameters as 31 march :(

AH

Are you using the "buy now" buttons on product page?

If this is the case then the following might help:-

In your log

[redirect_cmd]   ⇒   _xclick

Based on this parameter your payments are treated differently in the code:

\plugins\vmpayment\paypal\paypal\helpers\paypalstd.php



                        case '_xclick':
case '_donations':
$post_variables['item_name'] = $order_number_text . ': ' . $this->order['details']['BT']->order_number;
$post_variables['amount'] = $this->total;
break;



According to the specification the variable post variable 'item_name' is correct however, an "item_name_1" is what PayPal are saying they want.  I think this is because the "UPLOAD" value is set to 1

From PayPal spec:-

item_name_x Yes

The name associated with item x. To pass an aggregate name for the entire cart, use item_name_1.

Applies only to the Cart Upload command.




So I have 2 options for you to try in a backup !!!

You can either adjust the code to ignore the "UPLOAD value for buy now buttons"
Around line 232(not certain this is valid - but worth a try :-)  )




$post_variables['paymentaction'] = strtolower($this->_method->payment_action);
// do not send this variable when a _xclick buy button used
        if ($payment_type != '_xclick') {
            $post_variables['upload'] = '1';
        }


OR

You can modify the case for _xclick  around line 61 to change the item_name to item_name_1


switch ($this->_method->payment_type) {
case '_xclick':
                        $post_variables['item_name_1'] = $order_number_text . ': ' . $this->order['details']['BT']->order_number;
$post_variables['amount'] = $this->total;
break;
case '_donations':
$post_variables['item_name'] = $order_number_text . ': ' . $this->order['details']['BT']->order_number;
$post_variables['amount'] = $this->total;
break;





Please test and report your findings :-)
Regards
A

Joomla 3.10.11
php 8.0

mixedst

2017-04-18 19:40:20 DEBUG plgVmConfirmedOrder: order number: 2KYX068
2017-04-18 19:40:20 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 99.54 paymentcurrency 47 orderusercurrency47
2017-04-18 19:40:20 DEBUG PayPal request:: Array
(
    [cmd] => _ext-enter
    [redirect_cmd] => _xclick
    [paymentaction] => sale
    [upload] => 1
    [business] => paypal@xxx
    [receiver_email] => paypal@xxx
    [order_number] => 2KYX068
    [invoice] => 2KYX068
    [custom] => mil1tg16jbak4t88oj1k8ae116
    [currency_code] => EUR
    [address_override] => 0
    [first_name] => den
    [last_name] => den
    [address1] => den
    [address2] =>
    [zip] => 8000
    [city] => deneme
    [state] =>
    [country] => FR
    [email] => deme@xxx
    [night_phone_b] =>
    [return] => xxx.com
    [notify_url] => xxx.com
    [cancel_return] => xxx.com
    [rm] => 2
    [bn] => VirtueMart_Cart_PPA
    [no_shipping] => 0
    [no_note] => 1
    [image_url] => http://xxx
    [item_name_1] => Numro de la Commande: 2KYX068
    [amount] => 99.54
)

AH

Looks like you tried the second option.

And yet the data is what paypal said is "fine"

QuoteI noticed that you are using the UPLOAD cart function. With this function the item name variable must be like "item_name_1" with the underscore and one in number at the end ("_1"). You were not passing this variable name correctly but adding the _1 it works fine.

You have 2 options as far as I can see

Talk to paypal

or revert the change and try the first option
Regards
A

Joomla 3.10.11
php 8.0

mixedst

I also tried first option but it is same. Paypal does not receive the item name so there is an other problem i am experiencing.

So should i contact paypal?