VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: w259lkt on February 03, 2009, 14:19:17 PM

Title: MOD to resolve "payments not accepted in USD"
Post by: w259lkt on February 03, 2009, 14:19:17 PM
FOR VIRTUEMART 1.1.x (tested only on VIRTUEMART 1.1.2)
THIS IS A VERSION BASED ON PAYPAL - Currency Converter by Deneb RELEASED for VirtueMart 1.0.x

DO YOU NEED THIS?
--------------------------------
If you use a shop currency that is not one of these:
U.S. Dollar (USD)
Australian Dollar (AUD)
Canadian Dollar (CAD)
British Pounds Sterling (GBP)
Japanese Yen (JPY)
Euro (EUR)

...AND you wish to accept PayPal payments.
...BUT you can install this anyway and just disable it from the config.
...OR Dev Team can merge this into the next release.
--------------------------------

This payment Method:
->Converts the cart Total Amount and Shipping charges to one of the supported currencies that PayPal allows.
  TIP: The allowed currencies are viewable in your PayPal account, under 'Profile' > Financial Information - 'Currency Balances' links.
  TIP: For more payment receiving options related to currency, See 'Profile' > Selling Preferences - 'Payment Receiving Preferences' (make sure you are not blocking payments that you do not want blocked!)
->Shows a warning to the customer that the currency will be different in PayPal.(configurable!)
->Updates the payment variables sent to PayPal (Post Variables) with the new values. (Or in the case of customer viewing the order from 'Account Maintenance'...it formats the PayPal button correctly.

->Adds PayPal config option to:
  => Enable/Disable the converter
  => Set the supported PayPal currencies
  => Select the PayPal currency to use.
  => Enable/Disable a currency convert warning on Order View
  => Set the Pre text on the warning (HTML OK)
  => Set the Post text on the warning (HTML OK)

One thing to think about...
The current functionality of VM allows customers to checkout with PayPal payment selected, and not immediately fulfill payment.
Also, the currency converter is pulled from daily exchage rates and converts using those rates on the fly.
...The PayPal button on the order.
...Exchange Rates change.
So, an order where the PayPal payment is still 'pending' (whether marked as such or not) could be converted later at a
substantially different rate than when purchsed. This may / may not be advantagous / disadvantagous to the vendor / customer.
--------------------------------

Install Steps:
1. First, back-up some files:
  a. PayPal class files
    ->folder: /administrator/components/com_virtuemart/classes/payment/
    ->file: ps_paypal.php
    ->file: ps_paypal.cfg.php
  b. Language file
    ->folder: /administrator/components/com_virtuemart/languages/common
    ->file: english.php (and romanian.php for romanian users)
2. Figure out if you have any hacks currently applied to your PayPal files.
   You may or may not need to merge them into the code supplied with this hack.
3. Back-up your PayPal - 'Payment Extra Info'
  ->Login to Joomla admin and go to the VirtueMart admin.
  ->Select 'Store' > 'List Payment Methods' menu item,
  ->Find PayPal method on the list and click it's name to Edit.
  ->Go to 'Configuration' tab
  ->Copy all text in the 'Payment Extra Info' textbox at the bottom.
  ->Paste it into a text editor and save it somewhere local.
4. Figure out if you have any hacks currently applied to your PayPal 'Payment Extra Info' code.
   You may or may not need to merge them into the code supplied with this hack.
5. Upload the language files and overwrite with the file supplied in this attached archive: english.php (and romanian.php for romanian users)
6. Upload the class files (ps_paypal.php, ps_paypal.cfg.php) to folder: /administrator/components/com_virtuemart/classes/payment/
7. Configure your new PayPal method, and 'Payment Extra Info'
  ->Login to Joomla admin and go to the VirtueMart admin.
  ->Select 'Store' > 'List Payment Methods' menu item.
  ->Find PayPal on the list and click name to Edit.
  ->Go to 'Configuration' tab.
  ->Re-enter your old settings (look in your backed-up config file), and Choose the new settings you want for currency converter section.
  ->Copy all text from the file supplied in this attached archive (extrainfonew.txt)
    and Paste it into the 'Payment Extra Info' textbox at the bottom.
  ->Click the SAVE button.
8. Test it.

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: bigheadmall on March 16, 2009, 09:12:44 AM
Thank You very much ,I Find long time for Method Covert currency
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: sundar on April 11, 2009, 15:21:51 PM
i did al those thisngs as u said but still am getting

This recipient does not accept payments denominated in WS_Error_XClick_Pref_Foreign_Currency. Please contact the seller and ask him to update his payment receiving preferences to accept this currency.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: dragaodepapel on May 16, 2009, 01:02:19 AM
I'm getting a problem like that too, but my store works with Brazilian Real (BRL) and US Dolar (USD). PayPal don't have BRL in their accepted currencies list.

So, I follow the steps above, but I found a little problem here.
The vendor_currency in my case is "BRL", and I put in options that PayPal work with USD. In this case, the conversion works very, very well. But when the order is made with "USD" currency, selected by user, it's try to convert the value again, because it's using the vendor_currency, not the order currency.

So, I changed the file from w259lkt to use the order currency. The file is attached.

And, it's only the problem. Most of my orders is for downloadable goodies, so there is no shipping, so I make another change when it's verify if amount AND shipping isn't null. In my case, the shipping is.

So, when an order is made with BRL, this will convert to USD the value; and when an order is made with USD, the value remain correct.

Well, my english isn't so good, but I think that I can show the idea.

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: Reincha on July 25, 2009, 22:56:29 PM
i have a problem: everything works except when customer pays i receive e-mail:
----
PayPal IPN Error: Order Total/Currency Check failed:

During a paypal transaction on your site the received amount didn't match the order total.
                   Order ID: 49.
                   Order Number: 68_d2891ba92e9c09f90a00359d71673.
                   The amount received was: 0.15 EUR.
                   It should be: 0.11 LVL.
---------
Everything is correct 0.11 LVL is 0.15EUR , i receive correct amount, but order status stays the same

Hope you can help!
Thanks
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: rdavilamx on September 06, 2009, 22:40:13 PM
Hi,

I was made all the steps that you  posted to accept foreign currencies but I still have the same error.

"This recipient does not accept payments denominated in WS_Error_XClick_Pref_Foreign_Currency. Please contact the seller and ask him to update his payment receiving preferences to accept this currency."

My currency is Mexican Peso  (MXP)

any idea what could be wrong?

Thank you very much for your Help

Regards

Ricardo


[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: w259lkt on September 07, 2009, 14:06:15 PM
Hi rdavilamx!

what version of virtuemart are you using? the mod was tested only on ver 1.1.2.

pls also verify your paypal payement preferences.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: rdavilamx on September 07, 2009, 19:57:32 PM
Hi,

Thank you for your help,

I am using  the version 1.1.3, but i have found the error.

for Mexico we must to use MXN not MXP code.

regards

Ricardo

Title: Re: MOD to resolve "payments not accepted in USD"
Post by: sazz on September 09, 2009, 20:49:11 PM
Hi i have mistake somewhere, please can you tell me the right configuration?

This is what i done: take a look at screenshot

And in store configuration the currency is USD, tell me what i`m missing!

My store is bulgarian - BGN as country and BGL as currency ;)

When i complete payment step the store redirects me to paypal, but the prise is not conwerted. Plese take a look to my configuration!

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: w259lkt on September 10, 2009, 10:12:56 AM
first of all, I wish to thank everyone of you for your interest in my little mod to DENEBs mod.

Attached I have posted 3 screenshots from my configuration.

1. In store configuration choose your currency (RON for me as we operate in Romania) and the list of accepted currencies  (EUR and USD for our store - this is the price we use for items - but displayed in RON) - screen1
2. edit english.php and save it asa your_language.php (it is romanian.php in my case). edit your_language.php and translate all the fields. then, apply the procedure form the first/initial post in this thread, replacing the occurencies of romanian.php with your_language.php in the procedure.
3. Choose the payement method paypal (as configured before) and edit in payement method form your paypal commission rate (3.5% for me, written with a minus sign to be added as "negative discount") screen2.
4. do not edit anything in the next screen (configuration) except the warning texts in local language. screen3

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: sazz on September 10, 2009, 16:31:52 PM
i reccieve paypal screen as "This recipient does not accept payments denominated in WS_Error_XClick_Pref_Foreign_Currency. Please contact the seller and ask him to update his payment receiving preferences to accept this currency."

Maybe becouse of the language.php file. My is bulgarian.php but i don`t know what to change on it.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: w259lkt on September 10, 2009, 16:34:52 PM
what currency you use in store? please try to do the steps i outlined in last post.

rename english.php (provided by me ) to bulgarian.php.
there are some new fields inside.
after you check that it works, translate the fields inside in bulgarian.

it should do the trick.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: sazz on September 10, 2009, 16:53:24 PM
Its not about the language. I change the language but still reccieve that message in paypal.

My configuration is: screenshot

when i change currenci in euro it works

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: omdawe on October 31, 2009, 02:50:54 AM
I want to use this function for IDR (Indonesian Rupiah).. i use "VirtueMart 1.1.4 stable" and tried everything on this thread even the wrong turns but im still getting:

This recipient either does not accept payments denominated in IDR or has specified an invalid currency code on his web site. Please contact the seller and ask him either to update his payment receiving preferences to accept this currency or to correct his web site to specify a valid currency code.

If im not wrong, somewhere before for the client gets to PayPal they should get a "Pre Text for warning:" where should this come up?
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: girishkumar518 on November 03, 2009, 08:04:07 AM
I am using VirtueMart 1.1.3 stable  version
i follow the above steps but still i am getting following warning message on paypal site

This recipient either does not accept payments denominated in INR or has specified an invalid currency code on his web site. Please contact the seller and ask him either to update his payment receiving preferences to accept this currency or to correct his web site to specify a valid currency code.

I am using INR as a currency

Thanks
Girish
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: akaii on November 13, 2009, 03:45:55 AM
I get the same message using XPF (New Caledonia). Can somebody help please.
Whatismore I get this strange input in the text field
http://screencast.com/t/NjlhYzQ1ZmM
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: dinos on January 23, 2010, 22:18:47 PM
For all the people that cant get this to work try to replace all the Payment Extra Info on with the extrainfonew.txt and not to add it to the code.

Just replace all the code with the one provide it...

@w259lkt. You are the MAN! It works like a charm.

Thanks

Dinos

Title: Re: MOD to resolve "payments not accepted in USD"
Post by: jamiemac on February 08, 2010, 19:20:32 PM
Hi,

I'm running a site working in BRL - am getting the error "payments not accepted in EUR".

Tried this mod and many other things - but without luck?

Any suggestions to where the issue is?

Thanks Jamie
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: ikaspars on April 20, 2010, 18:20:58 PM
OMG, thank you, you saved a lot of headache
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: Uriel on May 04, 2010, 19:27:54 PM
Yup Same old message here. Tried everything step by step.

Virtuemart 1.1.4
Joomla 1.5

Store Currency ZAR
Paypal Currency US Dollar

Any advice ?
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: nikki_c on May 16, 2010, 21:10:09 PM
I have tried this and came up with the same error as Uriel

Virtuemart 1.1.4
Joomla 1.5

Store Currency ZAR
Paypal Currency US Dollar


I did notice that I do not have a currency_convert.php file - could this be the problem? If so how do I resolve it?
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: bossies on June 04, 2010, 11:49:19 AM
w259lkt YOU REALLY DA MAN!!!

Using Virtuemart 1.1.4 and Joomla 1.5.17 - and i am past that bl@dy warning message from Paypal - Now just figure out the Sandbox to test the whole thing.

but THANKS again for getting over one more obstacle and one step closer to a paypal website in South Africa!
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: bossies on June 06, 2010, 08:28:27 AM
w259lkt and for all that seems to still have a problem.  I have tested this and it worked fine when people buy small orders on the test site and we charge shipping.  Then i tested a big order that is free shipping and once more i receive the dreaded message This recipient either does not accept payments denominated in... bla bla bla.

then i changed the config that when someone buys big we only charge R5 shipping - just as long as you pass a amount bigger than 0 - it works.

Thus w259lkt - I am not a coder but there seem to something wrong with the module when the shipping is 0.  Perhaps its because it passes the total amount with shipping to Paypal.  So for now I will keep testing with a small amount of shipping, but it would be great if you can have a look at the module and "fix" the passing of 0 shipping.

i would like to build a download shop where there would be no shipping and thus the module would probably also don't work.

Sorry it I am wrong in my findings, but if i am write and you can fix this, it would a lot of people in South Africa and other countries that is not supported with Paypal.

Once again thanks for the work done so far!
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: darkcity on August 30, 2010, 13:20:19 PM
Quote from: bossies on June 06, 2010, 08:28:27 AM

Thus w259lkt - I am not a coder but there seem to something wrong with the module when the shipping is 0.  Perhaps its because it passes the total amount with shipping to Paypal.  So for now I will keep testing with a small amount of shipping, but it would be great if you can have a look at the module and "fix" the passing of 0 shipping.
i would like to build a download shop where there would be no shipping and thus the module would probably also don't work.

Quote from: Reincha on July 25, 2009, 22:56:29 PM
i have a problem: everything works except when customer pays i receive e-mail:
----
PayPal IPN Error: Order Total/Currency Check failed:

Are these two issues resolved by someone? Especially this 0 shipping bug.

Title: Re: MOD to resolve "payments not accepted in USD"
Post by: darkcity on September 03, 2010, 09:32:22 AM
Here's my solution to these issues mentioned earlier and plus third problem where conversion is not made.

Regarding 0 shipping I modified payment extra info (file attatched). On line 68: $tmp_a and $tmp_s are now updated even if shipping is 0.

To resolve PayPal IPN Error: Order Total/Currency Check failure I have only a workaround. It bypasses converted payment failure check.
Use at your own risk!

File notify.php has to be modified:
Look for // AMOUNT and CURRENCY CODE CHECK and replace everything before $mailsubject = "PayPal IPN Error: Order Total/Currency Check failed";

if ($db->f('order_currency') == EEK) {
$mc_gross_result = $amount_check = round($db->f("order_total"), 2 );
$currency_code_result = EEK;
}
else {
$mc_gross_result = $amount_check = round($db->f("order_total"), 2 );
$currency_code_result = EUR;
}                             
if( $mc_gross_result != $amount_check || $currency_code_result != $db->f('order_currency') ) {


And there was the third problem :) as users Uriel and nikki_c point out. Conversion isn't happening.
For that, attatched payment_extra_info has been modified on line 46 (after the comment).

In my case everything works now in VM 1.1.4

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: m.a.c on September 29, 2010, 22:17:04 PM
Bueno, se que ya pasó tiempo desde esta respuesta pero el problema se me presentó a mi en este año y mes, así que para toda la banda mexicana y hispañohablante (sease, que hablan español) lo que solucionó mi problema, estoy usando la versión 1.1.5 de virtuemart, encontré en la red una traducción que ha sido mas que suficiente y ahora es mucho mas facil.
Me encontré que no podía integrar paypal por un error:

This recipient does not accept payments denominated in WS_Error_XClick_Pref_Foreign_Currency. Please contact the seller and ask him to update his payment receiving preferences to accept this currency.

Cuando lo vi, me espanté, mas, porque no entendí nada, ya buscando en la red me encpntré la respuesta al inicio de este post listada que no intenté por lo complicado del asunto, así que busqué un poco mas y entre prueba y error lo único que hice fué:

Como el problema es el "Currency" (tarifa) el sistema lo único que pregunta es que tarifa es la que se cobrará por cada cargo, hay un choque porque no está especificada y menos, entre que y que se cambiará, me explico, cobras en pesos o en dolares? y en paypal, cual es la moneda que tienes como principal? bueno, si en los dos casos es dlls, no hay gran problema, pero los que necesitamos cobrar en pesos...

(antes de que hagas algo, por favor, porque no respondo, lee primero esta solución y checa si te es conveniente, de otra forma, busca un poco mas, ya que hay que hacer cambios en los productos que tengas si no has realizado el cambio oportuno en el paso 2)

1.- En tu cuenta de paypal selecciona el peso mexicano como tu moneda principal (si este es el caso).

2.- En la configuración de virtuemart/listar monedas/ Cambia el nombre de mexican pesos por pesos mexicanos y cambia MXP por MXN (Aquí hay un problema, así que lo detallo al final).

3a.- En tienda/listar metodos de pago/paypal/ en formulario de método de pago, solo tienes que agregar la tarifa que te cobra paypal por transacción, donde dice descuento, con signo negativo (porque si no es un descuento en el precio y no una tarifa) hay que agregar dicho porcentaje, en mi caso está oscilando enter 2.4 y 3.4 dependiendo el volumen de compra, en tipo de descuento es porcentaje, ahora, no creo tener que decirte que tienes que agregar tus datos de cuenta de paypal no?.
no hay que olvidar que paypal además de este porcentaje cobra como 3 o 4 pesos adicionales, hay que checar las tarifas en la misma página.

3b.- En tienda/listar metodos de pago/paypal(new api)/ en formulario de método de pago, hay que agregar la misma info, el mismo porcentaje de descuento que en el apartado anterior, si ya tienes tus datos de api, agrégalos, nada mas.

Ahora, el problema para los que sigan este metodo que funciona, ya me hice un pedido y se abre la ventana se cobro seguro de paypal y todo el rollo sin problemas, peeeeeerooooooo, al realizar todos estos cambios, los precios de los productos se dispararon hasta el cielo, un producto que costaba 10 pesos subió su costo a 165.10 y estuve en vela tratando de ver que era, borré los envíos, descuentos, caché, borré todo para no hacer largo el cuento, estaba por darme por vencido, borrar todo, reinstalar virtuemart y comenzar desde cero con lo que pudiera respaldar, cuando me di cuenta de un detalle, los productos estaban detallados con MXP, como moneda, por esa razón paypal respinga, porque no sabe que tipo de cambio es, ni que tárifa tiene, así que lo único que tienen que hacer es entrar y cambiar en cada producto (si, producto por producto ) el precio, dejarlo como debe ser (si, parece que está bien, pero no, tiene después del punto como 4 ceros y seleccionar como moneda MXN y no MXP) con eso, los precios volvieron a la normalidad.

Espero que a alguien le sea de utilidad mi solución, no tuve que hacer cambios tan drásticos, meterle mano a los archivos, ni remplazar algo ni nada, solo corregir un par de detalles en la configuración de transacción entre la api de paypal y virtuemart, una excelente aplicación de carrito de compra.
No olviden que estoy usando virtuemart versión 1.1.5 sin ningún tipo de hack.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: MCMuckle on October 07, 2010, 19:46:09 PM
Hi,

I would love to get this working for Kenya Shillings.  The ideal would to have prices on the shop show in Kenya Shillings but then be converted to GBP for the Paypal payment.

Currently I have installed the mod as per described but am not having any success.

The first thing I notice is that the message to inform buyers that the currency will be converted does not show during checkout. 

The other thing is that I have priced the item in GBP and set the display to be KES.  The display IS in KES but the conversion is not working.  I would prefer to use XEconvert instead of the default one as it provides better conversion but if I select that in Store options the checkout produces and error.

I have set the display price to KES
I have set allowed currencies to GBP
I have priced the item in GBP
My Paypal currency is GBP

Please see attached image for mod settings

Any idea where I am going wrong?

Thanks

*edit*

I realise that i had not set my Paypal email.  I have done that and tested again but still no joy :-(

[attachment cleanup by admin]
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: najem on October 08, 2010, 15:10:15 PM
Thank you very much for the post. Had the same problem.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: RC98 on November 02, 2010, 08:40:25 AM
OK guys need some help on this one I follow the steps w259lkt gave us at the beginning of the tread and everything works like a glove except for when redirect to Paypal site the conversion from "BRL" to "USD" is almost double the amount of what supposed to be, vendor currency is set to BRL (Brazilian Real) so i don't know what could of gone wrong can anybody help? 
Title: Working Perfactly !!!
Post by: chintan on December 12, 2010, 09:07:46 AM
Tested this solution on
Joomla 1.5.10
Virtuemart 1.1.4

It's working perfectly...I've also customized the "Payment Extra Info" so that it looks like the solution provided by http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html (http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html)

You can check that on www.BeyondToyz.in (http://www.beyondtoyz.in)

I am very very thankful to Dragos 'electric' DOBRE, w259lkt, post author of http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html (http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html) and all other virtuemart forum fellows.
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: roye1990 on August 18, 2011, 22:11:46 PM
Thx... works well... took a while to get it workin right..but not too much hassle...  ;)
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: andrestrauss on September 06, 2011, 17:46:01 PM
Thanks w259lkt

youre the man!! it works fine so far for South African rand
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: kalemanzi on September 08, 2011, 03:36:05 AM
Aaaaah. Bless you anti pesto. It works!
Title: Re: MOD to resolve "payments not accepted in USD"
Post by: Devo1 on July 14, 2012, 16:13:00 PM
Hi, maybe someone can help me out. I`ve tried this method, and it partially works. My items initially are imported in USD, but being converted by VM to rubles. After checkout i`m getting prices in USD(which is what i need because paypal doesn`t accept rubles), but this prices are the result of paypal module thinking that it needs to muliply the checkout price by USD convertion rate, while it should devide. Say the price is 600 rubles, i should get at paypal 600/30=20 but i`m getting 600*30=18000
Please help anyone!