|
1 | 1 | ==========================================
|
2 | 2 | How to accept paypal payments on invoices?
|
3 | 3 | ==========================================
|
| 4 | + |
| 5 | +The "Paypal Payment Acquirer" module allows you to accept payments via |
| 6 | +paypal, for your sales orders, invoices, or online orders. As paypal |
| 7 | +accepts payments through credit cards (VISA, Mastercard, …), you will be |
| 8 | +able to process most payment methods. |
| 9 | + |
| 10 | +Paypal support two modes: |
| 11 | + |
| 12 | +- Paypal Merchant Account: the user is redirected to paypal to do the |
| 13 | + payment (either with a credit card or a paypal account) |
| 14 | + |
| 15 | +- PayPal PayFlow Pro (S2S, Server 2 Server): the user is not redirected |
| 16 | + to paypal and the payment can be done in the background. This |
| 17 | + method is mostly used for subscription businesses where you need |
| 18 | + to charge your customers periodically. |
| 19 | + |
| 20 | +As of today, Odoo only support the normal Paypal Merchant Account. |
| 21 | + |
| 22 | +Configuration |
| 23 | +============= |
| 24 | + |
| 25 | +Install the "PayPal Payment Acquirer" module |
| 26 | +-------------------------------------------- |
| 27 | + |
| 28 | +Start by installing the **PayPal Payment Acquirer** module. |
| 29 | + |
| 30 | +Once the module is installed, you should see a new payment acquirer in |
| 31 | +the Setting application, menu "Payment Acquirers". |
| 32 | + |
| 33 | +.. image:: ./media/paypal01.png |
| 34 | + :align: center |
| 35 | + |
| 36 | +By default, Paypal is configured to work in a test environment, |
| 37 | +out-of-the-box. It means you can already test the full order to payment |
| 38 | +flow with the paypal sandbox, without having to configure the next |
| 39 | +steps. |
| 40 | + |
| 41 | +Creating and configuring a PayPal merchant account |
| 42 | +-------------------------------------------------- |
| 43 | + |
| 44 | +Create a basic Paypal account |
| 45 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 46 | + |
| 47 | +a. Existing or newly created Personal Paypal account can be used. |
| 48 | + |
| 49 | +b. Or upgrade your account to Business account (merchant) if needed |
| 50 | + |
| 51 | +.. figure:: ./media/paypal02.png |
| 52 | + :figclass: figure |
| 53 | + :align: center |
| 54 | + |
| 55 | + Paypal Account Summary page |
| 56 | + |
| 57 | +Paypal Configuration |
| 58 | +^^^^^^^^^^^^^^^^^^^^ |
| 59 | + |
| 60 | +1. Access "Seller preferences" menu from `PayPal website <https://www.paypal.com/myaccount/home>`__ |
| 61 | + |
| 62 | + .. image:: ./media/paypal03.png |
| 63 | + |
| 64 | +.. _WebsitePreferences: |
| 65 | + |
| 66 | +2. Access "Website preferences" and configure Auto Return |
| 67 | + |
| 68 | + * **Database name**: yourcompany |
| 69 | + * **Website URL**: https://yourcompany.odoo.com/ |
| 70 | + * **Return URL**: https://yourcompany.odoo.com/shop/confirmation |
| 71 | + |
| 72 | + .. image:: ./media/paypal04.png |
| 73 | + .. image:: ./media/paypal05.png |
| 74 | + |
| 75 | + These settings will redirect your buyer to your web confirmation page. |
| 76 | + |
| 77 | + .. image:: ./media/paypal06.png |
| 78 | + |
| 79 | +3. Access and edit Instant payment notifications settings - IPN |
| 80 | + |
| 81 | + .. image:: ./media/paypal07.png |
| 82 | + .. image:: ./media/paypal08.png |
| 83 | + |
| 84 | + Example |
| 85 | + |
| 86 | + - **Database name**: "yourcompany" |
| 87 | + - **Website URL**: https://yourcompany.odoo.com/ |
| 88 | + - **Notification URL**: https://yourcompany.odoo.com/payment/paypal/ipn/ |
| 89 | + |
| 90 | + .. tip:: verify that your Notify URL uses the correct protocol (HTTP / HTTPS) |
| 91 | + |
| 92 | +4. Set the encoding to UTF-8 from the menu :menuselection:`Settings --> |
| 93 | + Language Encoding --> More Options --> More selling tools` |
| 94 | + |
| 95 | + .. image:: ./media/paypal09.png |
| 96 | + |
| 97 | + .. image:: ./media/paypal10.png |
| 98 | + |
| 99 | + .. image:: ./media/paypal11.png |
| 100 | + |
| 101 | +5. Record your Merchant Paypal ID (personal or business account |
| 102 | + both will have it) it will be entered in Odoo backend :menuselection:`Paypal |
| 103 | + Settings --> Account Options`. |
| 104 | + |
| 105 | + .. image:: ./media/paypal12.png |
| 106 | + |
| 107 | + .. image:: ./media/paypal13.png |
| 108 | + |
| 109 | +6. If you want your customers to be able to pay through Paypal |
| 110 | + while not having a Paypal account- following setting "Paypal Account |
| 111 | + Optional" needs to be set to **ON**. All users will be able to |
| 112 | + choose Credit/debit card payment option - Paypal account not |
| 113 | + required. |
| 114 | + |
| 115 | + .. image:: ./media/paypal14.png |
| 116 | + |
| 117 | +Setup your Paypal Payment Acquirer account credentials in Odoo |
| 118 | +-------------------------------------------------------------- |
| 119 | + |
| 120 | +* :menuselection:`Settings --> Payments --> Payment Acquirers --> Paypal` |
| 121 | + |
| 122 | +* **Paypal Email ID**: your paypal account email address |
| 123 | + |
| 124 | +* **Paypal Merchant ID**: ID retrieved at previous step |
| 125 | + |
| 126 | +.. image:: ./media/paypal15.png |
| 127 | + :align: center |
| 128 | + |
| 129 | +.. todo:: section How to test an order |
| 130 | + |
| 131 | +Troubleshooting |
| 132 | +=============== |
| 133 | + |
| 134 | +If your eCommerce customer gets this Error Message after completing |
| 135 | +Paypal payment instead of being redirected to your database: |
| 136 | + |
| 137 | +.. image:: ./media/paypal16.png |
| 138 | + :align: center |
| 139 | + |
| 140 | +Verify the Auto Return URL you have `configured in Paypal <WebsitePreferences_>`_ |
| 141 | +is correct and pointing to your own domain name. |
| 142 | + |
| 143 | +You can either: |
| 144 | + |
| 145 | +* Enter the correct return URL and activate Auto Return |
| 146 | + |
| 147 | +* or deactivate Auto Return and delete URL (this method will have an |
| 148 | + extra click through Paypal in order to return to your ecommerce |
| 149 | + page.) |
| 150 | + |
| 151 | +.. seealso:: |
| 152 | + |
| 153 | + * :doc:`credit_cards` |
| 154 | + |
| 155 | +.. rst-class:: text-muted |
| 156 | + |
| 157 | +| Written by Glen Babakhin (Odoo) |
| 158 | +| Proofread by Samuel Cabodi (Odoo) |
0 commit comments