Magento: PayPal Website Payments Standard not displayed

Problem:

PayPal payment method is not displayed in payment method section of onepage checkout in Magento.

I am using “PayPal Website Payments Standard“.

I have enabled this module from backend.

System -> Configuration -> SALES -> Payment Methods -> PayPal Website Payments Standard.

Cause:

The possible cause is because base currency of your shop is not supported by PayPal.

You can find the Paypal supported currencies in app/code/core/Mage/Paypal/Model/Config.php:


/**
 * Currency codes supported by PayPal methods
 *
 * @var array
 */
protected $_supportedCurrencyCodes = array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MXN', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD', 'TWD', 'THB');

If your currency code is not in the above list then your currency is not supported by Paypal. And, this is the reason why you are not seeing Paypal payment methods on Checkout page.

Solution:

As a workaround, you can add your currency to the $_supportedCurrencyCodes array. For example, I have added NPR as the supported currency code below:


/**
 * Currency codes supported by PayPal methods
 *
 * @var array
 */
protected $_supportedCurrencyCodes = array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MXN', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD', 'TWD', 'THB', 'NPR');

After this, Paypal payment method will be displayed in the Checkout page.

Change currency code sent to Paypal

To change the data sent from your site to Paypal, you have to modify getStandardCheckoutFormFields() function of Mage_Paypal_Model_Standard class (app/code/core/Mage/Paypal/Model/Standard.php). This function returns an array ($rArr) with some necessary parameters. You need to change the value of ‘currency_code‘ and ‘amount‘ of the array. Currency_code can be any currency code that is supported by PayPal and Amount must be converted from your base currency to that particular currency code.

Hope this helps. Thanks.