David Tran Kế toán & Tài chính Lượt Xem: 305

The "Paypal Payment Acquirer" module allows you to accept payments via paypal, for your sales orders, invoices, or online orders. As paypal accepts payments through credit cards (VISA, Mastercard, …), you will be able to process most payment methods.

Paypal support two modes:

  • Paypal Merchant Account: the user is redirected to paypal to do the payment (either with a credit card or a paypal account)
  • PayPal PayFlow Pro (S2S, Server 2 Server): the user is not redirected to paypal and the payment can be done in the background. This method is mostly used for subscription businesses where you need to charge your customers periodically.

As of today, Odoo only support the normal Paypal Merchant Account.

Configuration

Install the "PayPal Payment Acquirer" module

Start by installing the PayPal Payment Acquirer module.

Once the module is installed, you should see a new payment acquirer in the Setting application, menu "Payment Acquirers".

./media/paypal01.png

By default, Paypal is configured to work in a test environment, out-of-the-box. It means you can already test the full order to payment flow with the paypal sandbox, without having to configure the next steps.

Creating and configuring a PayPal merchant account

Create a basic Paypal account

  1. Existing or newly created Personal Paypal account can be used.
  2. Or upgrade your account to Business account (merchant) if needed
./media/paypal02.png

Paypal Account Summary page

Paypal Configuration

  1. Access "Seller preferences" menu from PayPal website

    ./media/paypal03.png
  1. Access "Website preferences" and configure Auto Return (Payment Data Transfer must be left to Off)

    ./media/paypal04.png ./media/paypal05.png

    These settings will redirect your buyer to your web confirmation page.

    ./media/paypal06.png
  2. Access and edit Instant payment notifications settings - IPN

    ./media/paypal07.png ./media/paypal08.png

    Example

    Tip

    Verify that your Notify URL uses the correct protocol (HTTP / HTTPS). If you use the odoo.com domain, we advise you to use HTTPS.

  3. Set the encoding to UTF-8 from the menu :menuselection:`Settings --> Language Encoding --> More Options --> More selling tools`

    ./media/paypal09.png ./media/paypal10.png ./media/paypal11.png
  4. Record your Merchant Paypal ID (personal or business account both will have it) it will be entered in Odoo backend :menuselection:`Paypal Settings --> Account Options`.

    ./media/paypal12.png ./media/paypal13.png
  5. If you want your customers to be able to pay through Paypal while not having a Paypal account- following setting "Paypal Account Optional" needs to be set to ON. All users will be able to choose Credit/debit card payment option - Paypal account not required.

    ./media/paypal14.png

Setup your Paypal Payment Acquirer account credentials in Odoo

./media/paypal15.png

Troubleshooting

If your eCommerce customer gets this Error Message after completing Paypal payment instead of being redirected to your database:

./media/paypal16.png

Verify the settings you have configured in Paypal:

  • Auto Return should be on (the value can be quite generic, like <odoo_instance>/shop/confirmation; the correct URL will be set for each transaction)
  • Payment Data Transfer should be off

Warning

On-premise databases must be accessible through classic HTTP/HTTPS ports (80/443) for Paypal to work correctly, usually through a reverse proxy. Contact your integrating partner if you are unsure this is the case. Databases hosted on odoo.com are already configured correctly.