PayPal¶
Paypal is an American online payment provider available worldwide, and one of the few that does not charge a subscription fee.
注解
While PayPal is available in over 200 countries/regions, only a selection of currencies are supported.
Settings in PayPal¶
To access your PayPal account settings, log into PayPal, open the Account Settings, and open the Website payments menu.

重要
Note that for PayPal to work in Odoo, the options Auto Return and PDT must be enabled.
自动返回¶
The Auto Return feature automatically redirects customers to Odoo once the payment is processed.
From Website payments, go to and select On. Enter the address of your
Odoo database (e.g., https://yourcompany.odoo.com
) in the Return URL field, and
Save.
注解
Any URL does the job. Odoo only needs the setting to be enabled since it uses another URL.
支付数据传输(PDT)¶
PDT allows to receive payment confirmations, displays the payment status to the customers, and verifies the authenticity of the payments. From Payment data transfer and select On.
, scroll down to小技巧
PayPal displays your PDT Identity Token as soon as Auto return and Payment Data Transfer (PDT) are enabled. If you need the PDT Identity Token, disable and re-enable Payment data transfer to display the token again.
PayPal Account Optional¶
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 On for PayPal account optional.
and select支付信息格式¶
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. Then, click More Options and set the two default encoding formats as UTF-8.
小技巧
For Encrypted Website Payments & EWP_SETTINGS error, please check the Paypal documentation.
配置您的:ref:
Paypal Sandbox account <paypal/testing>
,然后按照`link <https://sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`_配置测试环境下的编码格式。
在Odoo上设置¶
Odoo needs your API Credentials to connect with your PayPal account. To do so, go to Activate PayPal. Then, enter your PayPal account credentials in the Credentials tab:
andEmail: the login email address in Paypal;
PDT Identity Token: the key used to verify the authenticity of transactions.
测试环境¶
配置¶
Thanks to PayPal sandbox accounts, you can test the entire payment flow in Odoo.
Log into the Paypal Developer Site using your PayPal credentials, which creates two sandbox accounts:
A business account (to use as merchants, e.g., pp.merch01-facilitator@example.com);
默认个人账户(用作客户,例如,pp.merch01-buyer@example.com)。
Log into PayPal sandbox using the merchant account and follow the same configuration instructions. Enter your sandbox credentials in Odoo (Credentials tab, and make sure the status is set on Test Mode.
in the用沙盒个人账号从Odoo中运行一笔测试交易。