Files
documentation/content/applications/finance/payment_providers/paypal.rst
T

128 lines
5.1 KiB
ReStructuredText
Raw Normal View History

======
2023-05-10 14:04:30 +00:00
PayPal
======
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
`Paypal <https://www.paypal.com/>`_ is an American online payment provider available worldwide, and
one of the few that does not charge a subscription fee.
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
Settings in PayPal
==================
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
To access your PayPal account settings, log into PayPal, open the :guilabel:`Account Settings`, and
open the :guilabel:`Website payments` menu.
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
.. image:: paypal/paypal-account.png
:align: center
:alt: PayPal account menu
.. important::
2023-05-10 14:04:30 +00:00
Note that for PayPal to work **in Odoo**, the options :ref:`Auto Return <paypal/auto-return>`,
:ref:`PDT <paypal/pdt>`, and :ref:`IPN <paypal/ipn>` **must** all be enabled.
2023-05-10 14:04:30 +00:00
.. _paypal/auto-return:
2023-05-10 14:04:30 +00:00
Auto Return
-----------
2023-05-10 14:04:30 +00:00
The **Auto Return** feature automatically redirects customers to Odoo once the payment is processed.
2023-05-10 14:04:30 +00:00
From :guilabel:`Website payments`, go to :menuselection:`Website preferences --> Update --> Auto
return for website payments --> Auto return` and select :guilabel:`On`. Enter the address of your
Odoo database (e.g., `https://yourcompany.odoo.com`) in the :guilabel:`Return URL` field, and
:guilabel:`Save`.
.. note::
2023-05-10 14:04:30 +00:00
Any URL does the job. Odoo only needs the setting to be enabled since it uses another URL.
2023-05-10 14:04:30 +00:00
.. _paypal/pdt:
2023-05-10 14:04:30 +00:00
Payment Data Transfer (PDT)
---------------------------
2023-05-10 14:04:30 +00:00
:abbr:`PDT (Payment Data Transfer)` allows to receive payment confirmations, displays the payment
status to the customers, and verifies the authenticity of the payments. From :menuselection:`Website
preferences --> Update`, scroll down to :guilabel:`Payment data transfer` and select :guilabel:`On`.
2019-05-13 11:17:42 +02:00
2023-05-10 14:04:30 +00:00
.. tip::
PayPal displays your **PDT Identity Token** as soon as :ref:`Auto return <paypal/auto-return>`
and :ref:`Payment Data Transfer (PDT) <paypal/pdt>` are enabled. If you need the **PDT Identity
Token**, disable and re-enable :guilabel:`Payment data transfer` to display the token again.
2019-05-13 11:17:42 +02:00
2023-05-10 14:04:30 +00:00
.. _paypal/ipn:
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
Instant Payment Notification (IPN)
----------------------------------
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
:abbr:`IPN (Instant Payment Notifications)` is similar to **PDT**, but allows for more
notifications, such as chargeback notifications. To enable **IPN**, go to :menuselection:`Website
payments --> Instant payment notifications --> Update` and click :guilabel:`Choose IPN settings`.
Enter a :guilabel:`Notification URL`, select :guilabel:`Receive IPN messages (Enabled)`, and
:guilabel:`Save`.
2023-05-10 14:04:30 +00:00
PayPal Account Optional
-----------------------
2023-05-10 14:04:30 +00:00
We advise not to prompt customers to log in with a PayPal account upon payment. It is better and
more accessible for customers to pay with a debit/credit card. To disable that prompt, go to
:menuselection:`Account Settings --> Website payments --> Update` and select :guilabel:`On` for
:guilabel:`PayPal account optional`.
2019-05-13 11:17:42 +02:00
Payment Messages Format
-----------------------
2023-05-10 14:04:30 +00:00
If you use accented characters (or anything other than primary Latin characters) for customer names
or addresses, then you **must** configure the encoding format of the payment request sent by Odoo to
PayPal. If you do not, some transactions fail without notice.
To do so, go to `your production account <https://www.paypal.com/cgi-bin/customerprofileweb
2023-05-10 14:04:30 +00:00
?cmd=_profile-language-encoding>`_. Then, click :guilabel:`More Options` and set the two default
encoding formats as :guilabel:`UTF-8`.
2020-01-03 11:16:17 +01:00
.. tip::
- For Encrypted Website Payments & EWP_SETTINGS error, please check the `Paypal documentation
2023-08-24 14:21:38 +02:00
<https://developer.paypal.com/docs/online/>`_.
- Configure your :ref:`Paypal Sandbox account <paypal/testing>`, then follow this
`link <https://sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`_
to configure the encoding format in a test environment.
2023-05-10 14:04:30 +00:00
Settings in Odoo
================
.. seealso::
:ref:`payment_providers/add_new`
Odoo needs your **API Credentials** to connect with your PayPal account. To do so, go to
:menuselection:`Accounting --> Configuration --> Payment Providers` and :guilabel:`Activate` PayPal.
Then, enter your PayPal account credentials in the :guilabel:`Credentials` tab:
- :guilabel:`Email`: the login email address in Paypal;
- :guilabel:`PDT Identity Token`: the key used to verify the authenticity of transactions.
.. _paypal/testing:
2019-05-13 11:17:42 +02:00
Test environment
================
Configuration
-------------
2023-05-10 14:04:30 +00:00
Thanks to PayPal sandbox accounts, you can test the entire payment flow in Odoo.
2023-05-10 14:04:30 +00:00
Log into the `Paypal Developer Site <https://developer.paypal.com/>`_ using your PayPal credentials,
which creates two sandbox accounts:
- A business account (to use as merchants, e.g.,
2023-05-10 14:04:30 +00:00
`pp.merch01-facilitator@example.com <mailto:pp.merch01-facilitator@example.com>`_);
- A default personal account (to use as shoppers, e.g.,
`pp.merch01-buyer@example.com <mailto:pp.merch01-buyer@example.com>`_).
2023-05-10 14:04:30 +00:00
Log into PayPal sandbox using the merchant account and follow the same configuration instructions.
Enter your sandbox credentials in Odoo (:menuselection:`Accounting --> Configuration --> Payment
Providers --> PayPal` in the :guilabel:`Credentials` tab, and make sure the status is set on
:guilabel:`Test Mode`.
2019-05-13 11:17:42 +02:00
Run a test transaction from Odoo using the sandbox personal account.
2020-01-06 16:51:35 +01:00
.. seealso::
- :doc:`../payment_providers`